I have a suggestion. There shall be always a numeric answer for variable A, but what happens when you hit enter without writing any number? Probably the user is saying that the default value (of no entered value) should be 0. My suggestion is for that let PC-BASIC accepts value 0 for a none entered value instead of the error message: “?Redo from start.” Of course the programmer can work around this using a string value A$ and then converting the null into a 0, using A=VAL(A$).
This is useful for users hitting just enter in knowledge that they are choosing the default value like in GWBASIC..
Ron.
P.D. The new release 15.08.02 works marvelously. Thank You!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Ronald, you are right once more, INPUT should accept empty values as it does in GW-BASIC. I think this used to work correctly in an older version, but a bug has come in while refactoring this code. It's easily fixed an will be in the next bugfix release.
Last edit: Rob Hagemans 2015-12-02
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
May I put in my 2 cents here? I seem to remember GW-BASIC just not changing A if [ENTER] is pressed before an value is input. If A is defined, it leaves it alone. If A is not defined, it creates a new A variable with a value of 0. It never used to go back and change A to 0 if it already had a value. This allows a program user to just press [ENTER] over values that were previously input.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have a suggestion. There shall be always a numeric answer for variable A, but what happens when you hit enter without writing any number? Probably the user is saying that the default value (of no entered value) should be 0. My suggestion is for that let PC-BASIC accepts value 0 for a none entered value instead of the error message: “?Redo from start.” Of course the programmer can work around this using a string value A$ and then converting the null into a 0, using A=VAL(A$).
This is useful for users hitting just enter in knowledge that they are choosing the default value like in GWBASIC..
Ron.
P.D. The new release 15.08.02 works marvelously. Thank You!
Hi Ronald, you are right once more,
INPUT
should accept empty values as it does in GW-BASIC. I think this used to work correctly in an older version, but a bug has come in while refactoring this code. It's easily fixed an will be in the next bugfix release.Last edit: Rob Hagemans 2015-12-02
May I put in my 2 cents here? I seem to remember GW-BASIC just not changing A if [ENTER] is pressed before an value is input. If A is defined, it leaves it alone. If A is not defined, it creates a new A variable with a value of 0. It never used to go back and change A to 0 if it already had a value. This allows a program user to just press [ENTER] over values that were previously input.
It does set the value to zero if nothing is entered. This has been checked and confirmed with GW-BASIC 3.23