Ok i am kind of new to darkbasic programming language. I had test out this code earlier and it execute on 1024 x 768 resolution:
print "Hello World"
But after i put this code below that code above, the whole resolution becomes 800 x 600 or 640 x 480, why? Any idea?
randomize timer()
x1 = rnd(1024)
y1 = rnd(768)
x2 = rnd(1024)
y2 = rnd(768)
line x1,y1,x2,y2
length# = distance(x1,y1,x2,y2)
print "Length of the line: ";length#
suspend for key
end
function distance(x1,y1,x2,y2)
dist# = sqrt((x1 - x2) ^ 2 + (y1 - y2) ^ 2)
endfunction dist#
After i remove the code above but remains print "Hello World", the resolution returns back to 1024 x 768.
Thank you.
Regards,
Chua Wen Ching