Talk:INPUT(hash)

From C64-Wiki
Jump to navigationJump to search

Having tried to apply the first example, I think I found an error: Line 40 should close File Number 1, not 3, since 3 is the device number and 1 the file number.

You are correct! Thank you very much. --Jodigi (talk) 02:11, 31 May 2017 (CEST)

What happens at EOF?[edit source]

What happens if you use INPUT# on a file with no data in or, or when you have run off the end? I cannot find a clear statement on this wiki or other sources. There is no ?END OF FILE error, so it is not obvious what happens here. Maury Markowitz (talk) 14:35, 13 January 2025 (CET)

It depends on the device type. On a floppy device INPUT# gets an error, the given variable are left untouched (for those where no data is available if there are more variables given) and INPUT# terminates. Probably the same for any other device as far it provides an error state which let INPUT# recognize that something went wrong. With system variable ST the device provides the state which should be checked to see how to proceed.
Alas, this page is behind the German version. Even the German version is not very specific on this topic. I think there is some work to be done. ;) --JohannKlasek (talk) 23:17, 16 January 2025 (CET)