-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathcalc.m
More file actions
executable file
·38 lines (34 loc) · 1.22 KB
/
calc.m
File metadata and controls
executable file
·38 lines (34 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#! xbigforth
\ automatic generated code
\ do not edit
also editor also minos also forth
component class calc
public:
tableinfotextfield ptr a#
tableinfotextfield ptr b#
tableinfotextfield ptr c#
( [varstart] ) ( [varend] )
how:
: params DF[ 0 ]DF X" Calculator" ;
class;
calc implements
( [methodstart] ) ( [methodend] )
: widget ( [dumpstart] )
#0. ]N ( MINOS ) ^^ SN[ ]SN ( MINOS ) X" A:" tableinfotextfield new ^^bind a#
#0. ]N ( MINOS ) ^^ SN[ ]SN ( MINOS ) X" B:" tableinfotextfield new ^^bind b#
^^ S[ a# get b# get d+ c# assign ]S ( MINOS ) X" +" button new
^^ S[ a# get b# get d- c# assign ]S ( MINOS ) X" -" button new
^^ S[ a# get b# get d* c# assign ]S ( MINOS ) X" *" button new
^^ S[ a# get b# get drop ud/mod c# assign drop ]S ( MINOS ) X" /" button new
^^ S[ c# get a# assign ]S ( MINOS ) X" >A" button new
^^ S[ c# get b# assign ]S ( MINOS ) X" >B" button new
#6 hatbox new #1 hskips
#0. ]N ( MINOS ) ^^ SN[ ]SN ( MINOS ) X" R:" tableinfotextfield new ^^bind c#
#4 vabox new panel
( [dumpend] ) ;
class;
: main
calc open-app
event-loop bye ;
script? [IF] main [THEN]
previous previous previous