With fbc 1.06, I get the following error without space between 't' and '#':
error 148: Suffixes are only valid in -lang fb or deprecated or fblite in 'print#7, "test"'
Because:
fbc rev 1.06:
[fixed]
- #832: Fix bug allowing QB style suffixes on all keywords, regardless of -lang
With a previous fbc version, I suppose that without space, "#7" is ignored when -lang fb.
I see the documentation syntax has a space between print and # as do the examples.
Its my habit to not have a space between the print and #. That is my mistake and I won't do that anymore.
On linux using fbc 1.05 and with a space properly inserted between the print and #, I also get no output.
So regarding the origninal issue it seems there actually should be an error message saying something like "Error: invalid file number with print # ".
At the compilation level of the module, we can not know that '#7' is not a valid file number.
This verification can only be done at runtime.
The runtime error can be caught by testing the 'Err' value just after the 'Print #' statement.