Trying to port a simple (cannot be simpler) BASIC program to "the buggy little beast", such as:
INPUT N
DIM A(N)
FOR I=1 TO N
INPUT A(I)
NEXT I
END
I have faced the situation that the INPUT(I) does not work correctly in a HP35s program. It gives INVALID (I) regardless of the fact that the I points to an existing indirect variable.
The following example describes this situation:
LBL Z
10
STO I
STO (I)
VIEW I
PSE
VIEW (I) // Survives this step, showing (37) 10
PSE
INPUT (I) // Message: INVALID(I)
RTN
When I execute VIEW (I) directly from the keyboard after the program crashes, the program responds with:
(10) 10
which seems to be correct.
Maybe, I missing something here. If not, this may be very serious. Why (37) instead of (10)? Why INVALID(I) and crash for INPUT(I), when VIEW(I) does not cause crash.
The same happens if I is replaced by J in the routine-the response changes into INVALID(J).
Within the Forum I could not trace out if this situation has already been described elsewhere, simply because since HP35s arrived the amount of the posts in the Forum became enormous for me to follow properly as I used to.
To Katie: If this proves to be another bug (though I remember a similar problem with INPUT(I) already described), I feel that I will be ready to teach the beast how to dive in the Adriatic (I am beginning to hate the BLB). Yet another proof that I am not a better person than you.
Edited: 27 Aug 2007, 2:40 p.m. after one or more responses were posted