> RL> thanks jeff, it worked, except when the values list is split into
different
> RL> lines.... would it have to do with the way the PARSE parses until it
finds
> RL> spaces(BL)? can it be programmed to reckognize carriage returns as
> RL> delimeters too?
>
> Yes, but I hate reworking the Forth interpreter. Not that it can't be
> done easily, but I find whenever I go about to do this, there was a
> much easier way to do what I wanted that presented itself later.
do you think there could be a much easier way to do what i want to do? how
does the FORTH interpreter itself reckognize carriage returns as well as
spaces?
> It doesn't work because of the way the interpreter works. PARSE will
> read in the next name to be created, and when VARIABLE attempts to it
> will fail (because the name was already PARSE'd).
>
> You can get around this by saving and restoring the >IN variable
> (which keeps track of where in the input stream you are). Just
> modifying you code a little:
>
> : VARIABLES: ( -- )
> BEGIN >IN @ BL PARSE
> 2DUP S" }" COMPARE WHILE
> ROT >IN ! VARIABLE
> REPEAT 3DROP ;
hmm... well i just realized, that i could probably make it work better by
integrating the important bits of VARIABLE *into* the routine. too bad i'm
using a trial version of SwiftForth, which lacks the source for the kernel,
otherwise i'd do it. anyway that solution worked, again except for lists
with CR's... : /
-Roger
----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
For list command help, send subject "help" to sftalk-request_at_forth.com
Message archives are located at http://www.forth.com/archive/sftalk
----------------------------------------------------------------------
This list is a forum for SwiftForth users. For product support and bug
reports, please send email to support_at_forth.com
----------------------------------------------------------------------
Received on Sat Nov 29 2003 - 14:39:36 PST
Subscribe to our e-mail list service. It's free for all SwiftForth and SwiftX users!
This archive was generated 06-Feb-2012. Archive updated nightly.