I wanted to submit a program that I converted from QB64, but I am running into some problems with the interpreter.
It doesn't support double-dimensional arrays, and it has nothing like SPACE$() to be able to fake it with strings. It doesn't look even concatenation is supported. This is what I'm trying to do:
Because there is no POINT() neither I need a double-dimensional array to keep track of a fake screen to check stuff. The interpreter seems to have a problem with indexing the arrays. I have gone over an hour with this and am sure my code is correct.
One more thing: when a subscript for an array is out of range, this interpreter does nothing about it. Therefore it could become difficult to catch bugs.
EDIT: made a small change to the program. Saving wear and tear having to click the mouse button too many times.
It doesn't support double-dimensional arrays, and it has nothing like SPACE$() to be able to fake it with strings. It doesn't look even concatenation is supported. This is what I'm trying to do:
Code: (Select All)
var i, x, y, coord
'DIM scre(1 to 30, 1 to 80) as string
var scre[2400]
i = 1
while i < 2401
scre[i] = 0
i = i + 1
wend
'put something in center of screen
x = 40
y = 15
coord = (y - 1) * 80 + (x - 1)
scre[coord] = 1
i = 1
while i < 101
x = Rand(4) + 38
y = Rand(4) + 13
coord = (y - 1) * 80 + (x - 1)
if scre[coord] = 1
fcolor 255, 255, 255
print 0, 0, "FOUND IT!"
print 0, 20, i
print 20, 20, "tries."
i = 101
swap
endif
i = i + 1
wend
Because there is no POINT() neither I need a double-dimensional array to keep track of a fake screen to check stuff. The interpreter seems to have a problem with indexing the arrays. I have gone over an hour with this and am sure my code is correct.
One more thing: when a subscript for an array is out of range, this interpreter does nothing about it. Therefore it could become difficult to catch bugs.
EDIT: made a small change to the program. Saving wear and tear having to click the mouse button too many times.