home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.hp48
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!spool.mu.edu!darwin.sura.net!zaphod.mps.ohio-state.edu!rpi!news.columbia.edu!lamont!elwood.plk.af.mil!medina
- From: medina@elwood.plk.af.mil (David F. Medina)
- Subject: Loop STO to X1, X2, X3 ....
- Message-ID: <1992Nov5.163159.9564@lamont.ldgo.columbia.edu>
- Sender: news@lamont.ldgo.columbia.edu
- Organization: Lamont-Doherty Geological Observatory
- Date: Thu, 5 Nov 1992 16:31:59 GMT
- Lines: 28
-
- I found this out by trial and error and thought others may find
- the solution useful:
-
-
- PROBLEM:
-
- To store a set of numbers to variables (for ex.) X1, X2, X3 ...
- I loop over them as follows,
-
- 1 10 FOR i "X" i + OBJ-> STO NEXT
-
- The problem is that when OBJ-> is executed you get the number
- stored in Xi rather than the object 'Xi' to the stack since
- X1, X2, ... already exist. (This is true regardless of status of
- the SYM flag).
-
- SOLUTION:
-
- Use "'X" instead of "X" in the FOR loop.
-
- --
- (These are my opinions only)
- +---------------------------------------------------------+
- | David F. Medina | USAF Phillips Lab |
- | medina@jake.plk.af.mil | PL/WSSD |
- | Phone: 505-846-2018 | Kirtland AFB, NM 87117-6008 |
- +---------------------------------------------------------+
-
-