Interesting Sharp PC-1500 behavior - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: Not HP Calculators (/forum-7.html) +--- Forum: Not remotely HP Calculators (/forum-9.html) +--- Thread: Interesting Sharp PC-1500 behavior (/thread-19525.html) |
Interesting Sharp PC-1500 behavior - Jeff_Birt - 02-07-2023 04:42 PM 10 PRINT "LINE 10" 20 PRINT "LINE 20" 30 END RUN it, and when "LINE 10" is displayed type "PRINT 5+5" (no quotes) and hit ENTER. Then hit ENTER again. What happens? Does it surprise you? RE: Interesting Sharp PC-1500 behavior - robve - 02-07-2023 06:12 PM (02-07-2023 04:42 PM)Jeff_Birt Wrote: 10 PRINT "LINE 10" This is normal and expected: RUN<ENTER> LINE 10 PRINT 5+5<ENTER> 10 <ENTER> LINE 20 The reason is that WAIT is enabled by default and PRINT waits for you to press <ENTER>. But you can enter expressions instead, to see what values the variables have, which is great for debugging. Then press <ENTER> to continue the program. Press <UP> and hold to see the BASIC line executing. Pretty much all SHARP PC work this way. Use WAIT 0 in your program to remove the WAIT state. Press <CA> (<SHIFT> <CL>) to reset the state back to "normal" RUN MODE. This is why <CA> does a little bit more than <CL>. - Rob RE: Interesting Sharp PC-1500 behavior - Jeff_Birt - 02-07-2023 06:35 PM I expect the pause after PRINT, most pocket computers to that or have a pause statement to accomplish the same thing. I did not expect it to evaluate an expression that was typed in while paused, or let you do something like 'GOTO 100' and it will jump to 100 and keep on running. You can also jump to another part of the program with a DEF key while in PRINT pause. Is this mentioned anywhere in Sharp documentation? It has a few more quirks: 10 PRINT "Line 10" 20 END 30 PRINT "Line 30" If while pause after line 10 you do: CLOAD a The BUSY annunciator will come on and it will go through the motions of loading a program. The program is memory is not overwritten and when the CLOAD a completes it will skip line 20 and continue at line 30. This way: 10 PRINT "Line 10":END 30 PRINT "Line 30" If you enter CLOAD a after line 10 pauses, it will actually load a new program. |