home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.forth
- Path: sparky!uunet!well!well.sf.ca.us!jax
- From: jax@well.sf.ca.us (Jack J. Woehr)
- Subject: Re: Defining variables automatically
- Message-ID: <jax.724319426@well.sf.ca.us>
- Sender: news@well.sf.ca.us
- Organization: Whole Earth 'Lectronic Link
- References: <92348.2139563034871@QUCDN.QueensU.CA>
- Date: Mon, 14 Dec 1992 07:50:26 GMT
- Lines: 20
-
- In <92348.2139563034871@QUCDN.QueensU.CA> <3034871@QUCDN.QueensU.CA> writes:
-
- >I'm wondering if it is possible to define a word that then defines
- >new variables when it is executed. That is,
-
- You ask if input to the VARIABLE''s name generation can be
- redirected. It can, in most systems. The trick is to change the source
- of the input stream.
-
- This can be done in a number of ways. In ANS Forth, it will
- be regularized. SAVE-INPUT and RESTORE-INPUT handle preserving
- the current input stream. Then input can be obtained from the user,
- from a file, from an arbitrary character-address + count.
-
- =jax=
- --
- # jax@well.{UUCP,sf.ca.us} # # Member # # Vice President, #
- # du!isis!koscej!jax # # X3J14 TC # # Forth Interest Group #
- # JAX on GEnie # # for ANS # # P.O. Box 2154 #
- # SYSOP RCFB (303) 278-0364 # # Forth # # Oakland, CA 94621 #
-