This repository was archived by the owner on Jun 7, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +19
-10
lines changed Expand file tree Collapse file tree 3 files changed +19
-10
lines changed Original file line number Diff line number Diff line change @@ -14,11 +14,16 @@ end function
14
14
15
15
scope
16
16
dim a as integer = 5.6
17
- dim b as integer = foo1(2.9)
18
- dim c as double = foo1(2.4)
19
- dim d as double = foo2(2.4)
20
- dim e as string = foo3(2.6)
21
- dim f as integer = foo1(a)
17
+ dim b as integer
18
+ b = foo1(2.9)
19
+ dim c as double
20
+ c = foo1(2.4)
21
+ dim d as double
22
+ d = foo2(2.4)
23
+ dim e as string
24
+ e = foo3(2.6)
25
+ dim f as integer
26
+ f = foo1(a)
22
27
23
28
print a;b;c;d;e;f;
24
29
end scope
Original file line number Diff line number Diff line change 1
1
' Usage of builtin functions inside user-defined functions
2
2
3
3
function strLen(s as string) as integer
4
- dim b as integer = length(s)
4
+ dim b as integer
5
+ b = length(s)
5
6
return b
6
7
end function
7
8
8
9
function subString(s As String, i As Integer, n As Integer) As String
9
- dim b as String = SubStr(s, i, n)
10
+ dim b as String
11
+ b = SubStr(s, i, n)
10
12
return b
11
13
end function
12
14
13
15
function AsciiVal(s As String, i As Integer) As Integer
14
- dim b as Integer = asc(s, i)
16
+ dim b as Integer
17
+ b = asc(s, i)
15
18
return b
16
19
end function
17
20
18
21
function CharFromAscii(i As Integer) As String
19
- dim b as String = Chr(i)
22
+ dim b as String
23
+ b = Chr(i)
20
24
return b
21
25
end function
22
26
Original file line number Diff line number Diff line change 1650
1650
{
1651
1651
"info" : " Errors during interpretation" ,
1652
1652
"interpreter_exit_code" : 57 ,
1653
- "code" : " scope \n print 3\\ -0.2; \n end scope"
1653
+ "code" : " scope \n print 3\\ (0 -0.2) ; \n end scope"
1654
1654
},
1655
1655
{
1656
1656
"info" : " Errors during interpretation" ,
You can’t perform that action at this time.
0 commit comments