Talk:INPUT

From C64-Wiki
Jump to navigationJump to search

Suppressing "?"[edit source]

"Using POKE 19,1 will" - is this true for all platforms, or just certain models? Maury Markowitz (talk) 21:08, 25 November 2020 (CET)

This should be works on every real C64 --Jodigi (talk) 21:32, 27 November 2020 (CET)


This differs on platforms, above works at least for C64, VC-20, C16/C116/C264, but on a C128 this is at location $15/21, see C128 zeropage (there is currently only a german version). --JohannKlasek (talk) 21:34, 3 December 2020 (CET)

BASIC V1 behavior[edit source]

Empty Input


BASIC V1 of the PET series differs in that an empty input, pressing the return key with no other characters, will stop execution of the current program and exit to the READY prompt.

Details:

I'm asking about this note in the wiki:

   If the user presses RETURN  without providing any data, the contents of the variables remains unchanged.

Consider this program in the Online PET emulator:

   10 INPUT A
   20 GOTO 10

If I type a value in when prompted, it goes back to 10:

? 1
? 25
? 33

But if I simply hit return, it exits the program:

? 

READY.

So I think there is perhaps some additional subtlety here? Maury Markowitz (talk) 22:29, 11 October 2024 (CEST)

Normally not on a C64 or C64 emulator.
It looks that in BASIC V2 or higher for the Plus/4 and C128 the programm wait until INPUT gets a value.
If you enter an empty value, you will get the INPUT-?-prompt again on a C64/128.
Remark: This article describes the BASIC command INPUT in BASIC V2 at the Commodore 64.
--Jodigi (talk) 23:35, 11 October 2024 (CEST)
The notice regarding BASIC V1 has been removed. This is not the right place to describe BASIC V1 behavior. The discussion tab is an intermediate possibility to hold this information. It would be better to create a separate page for INPUT (BASIC V1), maybe with reference or similar content of BASIC V2's INPUT and some deviating information. --JohannKlasek (talk) 19:42, 3 November 2024 (CET)