Hi, the FIELD #1, 255 as D$ makes an Illegal function call when is used with OPEN "filename" FOR RANDOM as #1 LEN=255. GWBASIC apparently respond OK with this.
OPEN "FILENAME" FOR RANDOM AS #1 LEN = 255: FIELD #1, 255 AS D$
Ron.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The Illegal function call is caused by the OPEN statement, because 255 is greater than the default maximum record length of 128. This is the same behaviour as GW-BASIC.
You can extend the maximum record length with max-reclen=255 or, on the command line, pcbasic -s=255. Likewise, you can make GW-BASIC allow this with GWBASIC /s:255.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Okay, so this means that I can use the option (max-reclen=255), and the OPEN statement will behave just like GWBASIC? I ask because in GWBASIC I opened the same file with the same specifications superseding the default (128) and it accepted it without the error. So I will fix the option: max-reclen=255 at PCBASIC.INI. Thank you, very much.
Ronald.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Which version of GW-BASIC do you use?
The PC (as opposed to Tandy) version 3.23 that I use for testing has a maximum record length of 128 and gives an illegal function call on the OPEN statement as given above. This is also in line with the Microsoft documentation (though that doesn't mean much). Other versions may behave differently though. Anyway, setting the max-reclen=255 or higher will indeed allow the statement.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes! You're right. I'm using 3.20 Tandy GWBASIC to emulate Tandy/PCJR programs. That's what my father had in the mid 80's. The version 3.23 causes the same error. So PC-BASIC is emulating the 3.23 ver., until now. I see, now, what you were telling me about the command line /s:255. So with the PCBASIC option I handle the 255 bytes quite right, thanks again. /Ron.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, the FIELD #1, 255 as D$ makes an Illegal function call when is used with OPEN "filename" FOR RANDOM as #1 LEN=255. GWBASIC apparently respond OK with this.
OPEN "FILENAME" FOR RANDOM AS #1 LEN = 255: FIELD #1, 255 AS D$
Ron.
The
Illegal function call
is caused by theOPEN
statement, because 255 is greater than the default maximum record length of 128. This is the same behaviour as GW-BASIC.You can extend the maximum record length with
max-reclen=255
or, on the command line,pcbasic -s=255
. Likewise, you can make GW-BASIC allow this withGWBASIC /s:255
.Okay, so this means that I can use the option (max-reclen=255), and the OPEN statement will behave just like GWBASIC? I ask because in GWBASIC I opened the same file with the same specifications superseding the default (128) and it accepted it without the error. So I will fix the option: max-reclen=255 at PCBASIC.INI. Thank you, very much.
Ronald.
Which version of GW-BASIC do you use?
The PC (as opposed to Tandy) version 3.23 that I use for testing has a maximum record length of 128 and gives an illegal function call on the OPEN statement as given above. This is also in line with the Microsoft documentation (though that doesn't mean much). Other versions may behave differently though. Anyway, setting the
max-reclen=255
or higher will indeed allow the statement.Yes! You're right. I'm using 3.20 Tandy GWBASIC to emulate Tandy/PCJR programs. That's what my father had in the mid 80's. The version 3.23 causes the same error. So PC-BASIC is emulating the 3.23 ver., until now. I see, now, what you were telling me about the command line /s:255. So with the PCBASIC option I handle the 255 bytes quite right, thanks again. /Ron.
It's interesting to see that Tandy GW-BASIC was set up differently in this regard. Perhaps I can change the settings for
preset=Tandy
to reflect this,