dmsc / fastbasic

FastBasic - Fast BASIC interpreter for the Atari 8-bit computers
GNU General Public License v2.0
140 stars 20 forks source link

no LOCATE pseudo function #4

Closed pkali closed 4 years ago

pkali commented 5 years ago

Cannot locate LOCATE :)

pkali commented 5 years ago

BTW - of course a better LOCATE would be a real function like v=LOCATE(x,y)

dmsc commented 5 years ago

Hi!

BTW - of course a better LOCATE would be a real function like v=LOCATE(x,y)

Yes, I did not implement LOCATE because I never used that function in my programs :)

Currently you can do: POSITION x, y : GET #6,z

Do you have an use case?

dmsc commented 5 years ago

Hi,

v=LOCATE(x,y)

About implementing it as a function (sing CIO), it will not always work, because you can't interleave the I/O inside PRINT statements. Doing PRINT "Hello "; LOCATE(x,y); " world" would move the cursor and redirect "world" to I/O channel #6.

pkali commented 5 years ago

Thanks for comment! Workaround with POSITION is good, I should get it when looking at sources of FB. And of course I've got a use case in a silly tenliner :]

dmsc commented 5 years ago

I will leave the issue open, as it is missing compared with Atari BASIC and TurboBasic XL.

dmsc commented 4 years ago

This was fixed at commit 6bccb6195ccad8059a6c629a5806e556dac42e45 , forgot to close.