breakintoprogram / agon-bbc-basic-adl

Official AGON QUARK Firmware: BASIC Interpreter (ADL version)
zlib License
16 stars 0 forks source link

OPENOUT does not return a handle for a new file #9

Closed robogeek42 closed 11 months ago

robogeek42 commented 11 months ago

OPENOUT returns a zero handle when a file does not exist. Expected a non-zero handle to be returned for a new file.

10 PRINT "Enter filename to write:"; : INPUT fn$
20 h%=OPENOUT(fn$)
30 PRINT "Handle ";h%

If the file exists, a non-zero handle is returned.

breakintoprogram commented 11 months ago

Hi @robogeek42 I think I fixed this in #5 that was released a day or so ago (version 1.02). Are you using version 1.01 of BBC BASIC for ADL? The code is working fine here with that version. Could you please confirm?

robogeek42 commented 11 months ago

Should have upgraded before reporting. My apologies. I'll check it out, and let you know. Thanks very much.

I can confirm this all works with 1.02. I have also tried writing to the files and using OPENUP to update existing files. Thanks !

breakintoprogram commented 11 months ago

@robogeek42 No worries! I'll mark this one as a duplicate and 'Won't Do' then :-)