1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-08-05 01:50:24 +00:00
QB64-PE/tests/compile_tests/qb64pe/element_createElementString.bas
Matthew Kilgore 90941fffa7 Replace CONSTs while we have the individual elements
This moves the CONST replacement up before we turn the elements into a
single string. The advantage is that we don't have to worry about
splitting the string properly to find the CONST names as the elements
are already split for us.t
2024-01-18 13:00:13 -05:00

33 lines
659 B
QBasic

Option _Explicit
DEFLNG A-Z
$Console:Only
Dim Debug As Long
Debug = -1
'$include:'../../../source/global/constants.bas'
'$include:'../../../source/utilities/type.bi'
sp = "@" ' Makes the output readable
Dim i As Long
PRINT "foobar element: " + createElementString$("foobar")
FOR i = 0 to 30
PRINT "foobar element"; i; ": " + createElementString$("foobar" + CHR$(i) + "baz")
NEXT
FOR i = 126 to 255
PRINT "foobar element"; i; ": " + createElementString$("foobar" + CHR$(i) + "baz")
NEXT
DIM s$
FOR i = 0 TO 255
s$ = s$ + CHR$(i)
NEXT
PRINT "all chars: " + createElementString$(s$)
System
'$include:'../../../source/utilities/elements.bas'