root/trunk/orca/tests/working/parse_block.r

Revision 55, 0.6 kB (checked in by krobillard, 3 years ago)

Implemented block parse.
orEqual() now works with words.
Added orDatatype macro.

Line 
1rebol []
2
3gui: [
4    title "Power Setting"
5    col 2
6    label "Time"   slider 0 0 1
7    label "Power"  slider 0 0 1
8    blank          spacer button "OK" [destroy]
9]
10
11print "^/Test1"
12parse gui [some[
13      'title x: string!         (print ['title first x])
14    | 'col x: integer!          (print ['col first x])
15    | 'label string!            (print ['label first x])
16    | 'button x: string! block! (print ['button first x])
17    | 'slider x: number! number! number!  (print ['slider x/1 x/2 x/3])
18    | 'blank                    (print 'blank)
19    | 'spacer                   (print 'spacer)
20]]
21
22
23print "^/Test2"
24parse gui [to 'button skip x: (print first x)]
Note: See TracBrowser for help on using the browser.