Run BASIC vs. Just BASIC
Aug 13, 2013 10:05:19 GMT -5
Post by krzysztof on Aug 13, 2013 10:05:19 GMT -5
- I compared the speed of my programs for simple mathematical calculations, running under RunBASIC and JustBASIC. Although RunBASIC has limitations, for example in an amount of generated numbers (eg prime numbers), then the speed of its operation is much greater than JustBASIC, and comparable to the speed of the analogous calculations carried out in FreeBASIC.
- Another thing is probably simpler syntax of graphics programs written for RunBASIC than a JustBASIC.
- Third, the differences in the operation of GOTO to break the loop. This break works fine in the similar programs running in RunBASIC and FreeBASIC, but does not work in JustBASIC. Weird, isn't it?
input "Enter the limit "; n
print "Prime numbers: "
for p = 2 to n
'or sqr(p) for faster calculations
for q = 2 to p - 1
'or (p mod q = 0)
if p / q = int(p / q) then goto [nextp]
next q
print p; " ";
[nextp]
next p
end