RPL second impressions (HP 28)
|
07-04-2018, 10:52 PM
Post: #59
|
|||
|
|||
RE: RPL second impressions (HP 28)
Complicated problems are not too big a problem. I don't use a computer to program the HP50g (I lost a computer trying to update a Prime so no more connections to computers and no more Primes.) The difficulty is the STRUCTURED PROGRAMMIN (as opposed with structured programming) has some quirks. In general I find that I'm almost always using the default for the work and CASE or IF for exception testing. There is a way out which I did use once. This code segment can be filled in with whatever makes the program work.
J=1 WHILE J REPEAT CASE 1 THEN stuff for initialization whatever 'J' STO END 2 THEN ….stuff whatever 'J' STO END … 45 THEN stuff 'J' STO END END END The above is a STRUCTURED PROGRAMMING method of writing code with an arbitrary structure (45 states above); one sets J to zero to exit the region. STRUCTURED PROGRAMMING doesn't help with readability or speed or programming or speed of execution. I'm polishing a small game (rolling 6 dice several times with complex scoring with 35 or more possibilities depending on previous happenings) on the HP50g. I just noticed I did use the above code in effect. I've got about 40 or so programs (executed from various menus) which return to 2 or 3 distributor-like programs. Instead of IF THEN ELSE structures; one just pushes the button on the menu. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)