We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b13dda4 commit 7013c15Copy full SHA for 7013c15
Showcase/calculator.red
@@ -0,0 +1,23 @@
1
+Red [
2
+ Title: "Calculator demo"
3
+ Author: "Nick Antonaccio"
4
+ File: %calculator.red
5
+ License: "Public domain"
6
+ Needs: 'View
7
+ Notes: "Very simple calculator app. More from Nick at http://redprogramming.com"
8
+]
9
+
10
+view [
11
+ title "Calculator"
12
+ f: field 230x50 font-size 25 "" return
13
+ style b: button 50x50 bold font-size 18 [append f/text face/text]
14
+ b "1" b "2" b "3" b " + " return
15
+ b "4" b "5" b "6" b " - " return
16
+ b "7" b "8" b "9" b " * " return
17
+ b "0" b "." b " / " b "=" [
18
+ attempt [
19
+ calculation: form do f/text
20
+ append clear f/text calculation
21
+ ]
22
23
0 commit comments