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

Revision 1, 0.7 kB (checked in by krobillard, 3 years ago)

Import orca & thune.

Line 
1REBOL[]
2
3f: func [a /opt b c] [ print c ]
4f/opt 1 2 3
5;3
6f 1
7;none
8
9;>> f/opt 1 2
10;** Script Error: f is missing its c argument
11;** Near: f/opt 1 2
12
13f: func [a /o b /j c] [ print c ]
14f 1
15;none
16
17f: func [a /o b /j c] [ print [b c] ]
18f 1
19;none none
20
21;>> f/j 2
22;** Script Error: f is missing its c argument
23;** Near: f/j 2
24
25f/j 1 2
26;none 2
27
28f/o 1 2
29;2 none
30
31f/j/o 1 2 3
32;3 2
33
34f/o/j 1 2 3
35;2 3
36
37f/j/j 1 2 3
38;none 3
39
40f: func [a /b b /j c] [ print [b c] ]
41f/b 1 2
42;true none
43
44;>> f/b/k 1 2
45;** Script Error: f has no refinement called k
46;** Near: f/b/k 1 2
47
48;>> f/b/b/b 1 2
49;** Script Error: f is missing its b argument
50;** Near: f/b/b/b 1 2
51
52f/b/b/b 1 2 3 4
53;true none
54
55o: context [ f: func [a /b b /j c] [ print [b c] ] ]
56o/f/b 1 2
57;true none
58
Note: See TracBrowser for help on using the browser.