Changeset View
Changeset View
Standalone View
Standalone View
autotests/input/brightscript.brs
- This file was added.
1 | | ||||
---|---|---|---|---|---|
2 | #i am macro | ||||
3 | | ||||
4 | library "a" | ||||
5 | | ||||
6 | function myfunc ( foo as Integer , bar as Float = 3.5 ) as Void | ||||
7 | end function | ||||
8 | | ||||
9 | sub mysub ( foo as Integer , bar as Float = 3.5 ) as Void | ||||
10 | end sub | ||||
11 | | ||||
12 | ' my comment | ||||
13 | | ||||
14 | Function MyCamelCaseFunction() | ||||
15 | lvalue = rvalue | ||||
16 | a=5 | ||||
17 | a=5! | ||||
18 | a=5# | ||||
19 | a=5% | ||||
20 | a=5& | ||||
21 | | ||||
22 | a$=5 | ||||
23 | a!=5 | ||||
24 | a#=5 | ||||
25 | a%=5 | ||||
26 | a&=5 | ||||
27 | | ||||
28 | a=a$ | ||||
29 | a=a! | ||||
30 | a=a# | ||||
31 | a=a% | ||||
32 | a=a& | ||||
33 | | ||||
34 | foo() | ||||
35 | a.foo() | ||||
36 | a=a.foo() | ||||
37 | | ||||
38 | eval=5 | ||||
39 | eval() | ||||
40 | a.eval() | ||||
41 | | ||||
42 | a=eval | ||||
43 | a=eval() | ||||
44 | a=a.eval() | ||||
45 | | ||||
46 | sleep=5 | ||||
47 | sleep() | ||||
48 | a.sleep() | ||||
49 | | ||||
50 | a=sleep | ||||
51 | a=sleep() | ||||
52 | a=a.sleep() | ||||
53 | | ||||
54 | if a=b c=d | ||||
55 | if a foo() | ||||
56 | if a then foo() | ||||
57 | | ||||
58 | if a | ||||
59 | end if | ||||
60 | | ||||
61 | if a then | ||||
62 | end if | ||||
63 | | ||||
64 | if a | ||||
65 | else if | ||||
66 | else | ||||
67 | end if | ||||
68 | | ||||
69 | if a | ||||
70 | elseif | ||||
71 | endif | ||||
72 | | ||||
73 | for each a in b | ||||
74 | end for | ||||
75 | | ||||
76 | for a=1 to 10 step 2 | ||||
77 | endFor | ||||
78 | | ||||
79 | for each a in b | ||||
80 | next | ||||
81 | | ||||
82 | while a | ||||
83 | end while | ||||
84 | | ||||
85 | while a | ||||
86 | endWhile | ||||
87 | | ||||
88 | a [ "a" , 1, foo() ] = 1 | ||||
89 | a.foo()[1]=1 | ||||
90 | | ||||
91 | a = { | ||||
92 | a : 1 | ||||
93 | b : "2" | ||||
94 | c : function() : end function | ||||
95 | } | ||||
96 | | ||||
97 | b.foo("string",1,{a:b},1.5,[1,2,3]) | ||||
98 | a = b.foo("string",1,{a:b},1.5,[1,2,3]) | ||||
99 | endFunction |