Nested If Statements


[Prev][Next][Index][Thread]

Nested If Statements



I'm working on a program on a TI-82 and it must contain multiple nestings of
If-Then-Else statements.  My manual for the calc mentions that nesting single
If statements is OK, but no mention is made for nesting If-Then or
If-Then-Else.  Is there a limit to the number of levels I may nest to?  Looking
at the program as it is formatted in the machine is confusing, too, since it's
hard to tell which End corresponds to which Then or Else.  I'm a C++
programmer, so I'd really like to use indentation and brackets, but obviously I
can't.  I think my calc is getting confused about which End goes with which
Then or Else.

Has anyone out there had similar problems or have any hints or suggestions?
 BTW, I'd like to avoid using Lbl and Goto - many years of programming classes
have drilled into my head that that is "bad style", but I guess if that's my
only option, I'll have to use it.

Thanks, Folks!

-Chris

--
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

                                  Christopher Myers
                          Hibbitt, Karlsson & Sorensen, Inc.
                          1080 Main St. Pawtucket, RI  02860
                             tel:  (401)727-4200 X 4404
                             fax:  (401)727-4208
                             email:  myers@hks.com

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


Follow-Ups: