Skip to content

Commit a21a1b5

Browse files
committed
Added test for BASIC string constants
1 parent 18c2d49 commit a21a1b5

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

Test/Expect/basexec06.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ p=91 b$=mval90
1515
100=$64
1616

1717
64 bits: x=1234567890 y=1234567889999
18+
S=[hello]

Test/basexec06.bas

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@ testread
8181
' some basic 64 bit stuff
8282
test64bits
8383

84+
' test constant strings
85+
const S1 = "hello"
86+
const S2 = S1
87+
88+
doshow(@S2)
89+
8490
' and exit
8591
doexit 0
8692

@@ -116,3 +122,7 @@ sub test64bits()
116122
print
117123
print "64 bits: x="; x; " y="; y
118124
end sub
125+
126+
sub doshow(sp as const string ptr)
127+
print "S=["; sp(0); "]"
128+
end sub

0 commit comments

Comments
 (0)