|
Post by bencooper on Oct 15, 2022 13:16:01 GMT -5
Just got back into data handling and can't figure out why OPEN FOR OUTPUT statement doesn't register as a valid statement (in blue text) during editing in the following snippet:
INPUT "What is the source file name ? :";file$
INPUT "What is the destination file name ? :";file2$
OPEN file$ FOR INPUT AS #1 ' this accepts OK OPEN file2$ FOR OUTPUT AS #2 ' not in blue text - does it need to be?
|
|
|
Post by Chris Iverson on Oct 15, 2022 13:27:14 GMT -5
This is just a weird quirk of the syntax highlighting.
You'll note that none of the other options you can use in the OPEN statement show up as blue.
'Random access file open file$ for random as #1
'DLL open file$ for DLL as #1
'Types of windows open file$ for window as #1 open file$ for graphics as #1 open file$ for text as #1
Why is that?
Because the INPUT token, by itself, is a command recognized by LB. You use it yourself in your example.
None of the other OPEN types are commands, so they don't get highlighted blue.
Arguably, INPUT shouldn't be highlighted as blue inside this statement, either.
Also, I noticed another weird quirk while testing this: OUTPUT in all caps is always written black. Not blue, or green, or anything else. But only if it's capitalized.
|
|
|
Post by bencooper on Oct 16, 2022 8:39:58 GMT -5
As always, Chris, thanks for your valued prompt advice ! Yes I also noticed the black allcaps as well !!
|
|