Post Reply 
(71B) The Devil's Dungeon game
12-19-2019, 12:51 AM
Post: #3
RE: (71B) The Devil's Dungeon game
.
Hi,

(12-18-2019 10:07 PM)Joe Horn Wrote:  
(12-18-2019 08:12 PM)smp Wrote:  The game, as listed in the book, relies on IF commands as the first command in a multi-command line. If the condition of the IF is true, then the rest of the multi-command line is executed, if the condition of the IF is false, the rest of the multi-command line is ignored. This is apparently not legal in HP-71B BASIC...

Unless I'm misunderstanding you, it is legal in HP-71 BASIC. [...]


It depends on what statements follow after the initial IF. For instance, there's this sequence in the posted code:

       150 IF RND>=0.01 THEN 160
       155 DISP"Tremor!" @ FOR I=1 TO 20 @ L(I)=INT(X0*RND+1) @ NEXT I
       160 ...


If this was originally like this:

       150 IF RND<0.01 THEN DISP"Tremor!" @ FOR I=1 TO 20 @ L(I)=INT(X0*RND+1) @ NEXT I

then it would certainly not be legal in the HP-71B, as FOR..NEXT loops aren't admisible after either THEN or ELSE.

Regards.
V.

  
All My Articles & other Materials here:  Valentin Albillo's HP Collection
 
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(71B) The Devil's Dungeon game - smp - 12-18-2019, 08:12 PM
RE: (71B) The Devil's Dungeon game - Valentin Albillo - 12-19-2019 12:51 AM
RE: (71B) The Devil's Dungeon game - smp - 12-19-2019, 02:39 PM



User(s) browsing this thread: 1 Guest(s)