This repository was archived by the owner on Jun 7, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 9 files changed +20
-20
lines changed Expand file tree Collapse file tree 9 files changed +20
-20
lines changed Original file line number Diff line number Diff line change @@ -5,14 +5,14 @@ function GHGKghgk55() as integer
5
5
end function
6
6
7
7
function GHGKghgk67() as integer
8
- dim a as integer
8
+ dim a as integer = 40
9
9
a = GHGKghgk55()
10
10
a = a + a
11
11
return a
12
12
end function
13
13
14
14
scope
15
- dim b as integer
15
+ dim b as integer = 20
16
16
b = GHGKghgk67()
17
17
print b;
18
18
b = GHGKghgk67()
Original file line number Diff line number Diff line change 1
1
' Recursive function
2
2
3
3
function recursive(param as integer) as integer
4
- dim param0 as integer
5
- dim res as integer
4
+ dim param0 as integer = 12
5
+ dim res as integer = 10
6
6
param0 = param - 1
7
7
if param = 0 then
8
8
return 42
@@ -13,7 +13,7 @@ function recursive(param as integer) as integer
13
13
end function
14
14
15
15
scope
16
- dim a as integer
16
+ dim a as integer = 12
17
17
a = recursive(4)
18
18
print a;
19
19
Original file line number Diff line number Diff line change 1
1
' calling multiple functions
2
2
3
3
function _add_two(_ as integer) as integer
4
- dim res as integer
4
+ dim res as integer = 0 - 15
5
5
res = _ + 2
6
6
return res
7
7
end function
@@ -18,7 +18,7 @@ function ____(_______ as integer) as double
18
18
end function
19
19
20
20
function __compute() as double
21
- dim res as integer
21
+ dim res as integer = 10 - 9
22
22
res = _multiply(30, 10)
23
23
res = _add_two(res)
24
24
res = ____(res)
Original file line number Diff line number Diff line change 1
1
' Input in function
2
2
3
3
function dsfs_567() as integer
4
- dim a as integer
4
+ dim a as integer = 10
5
5
input a
6
6
return a
7
7
end function
8
8
9
9
scope
10
- dim a as integer
10
+ dim a as integer = 12
11
11
a = dsfs_567()
12
12
print a;
13
13
end scope
Original file line number Diff line number Diff line change 1
1
' Function call function which have input
2
2
3
3
function foo() as integer
4
- dim a as integer
4
+ dim a as integer = 10
5
5
input a
6
6
return a
7
7
end function
8
8
9
9
function ghGHgh654655646() as integer
10
- dim a as integer
10
+ dim a as integer = 12
11
11
a = foo()
12
12
return a
13
13
end function
14
14
15
15
scope
16
- dim a as integer
16
+ dim a as integer = 10
17
17
a = ghGHgh654655646()
18
18
print a;
19
19
end scope
Original file line number Diff line number Diff line change @@ -5,19 +5,19 @@ function GK6767__() as integer
5
5
end function
6
6
7
7
function GKJ5___GGK() as integer
8
- dim a as integer
8
+ dim a as integer = 10
9
9
a = GK6767__()
10
10
return a
11
11
end function
12
12
13
13
function foo() as integer
14
- dim a as integer
14
+ dim a as integer = 11
15
15
a = GKJ5___GGK()
16
16
return a
17
17
end function
18
18
19
19
scope
20
- dim a as integer
20
+ dim a as integer = 9
21
21
a = foo()
22
22
print a;
23
23
end scope
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ end function
9
9
10
10
SCOPE
11
11
12
- dim a as integer
12
+ dim a as integer = 0 - 10
13
13
a = __HJHLH(__HJHLH(__HJHLH(2)))
14
14
print a;
15
15
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ end function
8
8
9
9
SCOPE
10
10
11
- dim __HJJ677 as integer
11
+ dim __HJJ677 as integer = 10
12
12
__HJJ677 = HJKLHJKL_(HJKLHJKL_(2) * HJKLHJKL_(2))
13
13
print __HJJ677;
14
14
Original file line number Diff line number Diff line change 163
163
"compiler_exit_code" : 3
164
164
},
165
165
{
166
- "info" : " assignment or undefined variable in same variable declaration" ,
167
- "code" : " scope \n dim a as integer = a + 1 \n end scope" ,
168
- "compiler_exit_code" : 0
166
+ "info" : " assignment or undefined variable in variable declaration" ,
167
+ "code" : " scope \n dim a as integer = b + 1 \n end scope" ,
168
+ "compiler_exit_code" : 3
169
169
},
170
170
{
171
171
"info" : " condition type error with string value" ,
You can’t perform that action at this time.
0 commit comments