![]() |
||
| Home | SwiftForth Archive | SwiftX Archive | |

thanks jeff, it worked, except when the values list is split into different
lines.... would it have to do with the way the PARSE parses until it finds
spaces(BL)? can it be programmed to reckognize carriage returns as
delimeters too?
on the side i tried to make another word like it called VARIABLES:
: variables: ( -- )
begin bl parse
2dup s" }" compare while
variable
repeat 2drop ;
it doesn't really work, gives me "Attempt to use zero-length string as a
name"
----- Original Message -----
From: "Jeff" <jma_at_mfire.com>
To: "Roger Levy" <sftalk_at_forth.com>
Sent: Friday, November 28, 2003 11:53 PM
Subject: [sftalk] Re: new to customizing forth....
> Hello Roger,
>
> Friday, November 28, 2003, 6:22:28 PM, you wrote:
>
> RL> Hi everyone... i want to add a new word VALUES:, to save me some
typing -
> RL> might look something like this:
>
> RL> VALUES:
> RL> 0 val1
> RL> 0 val2
> RL> 0 val3 }
>
> Here's a simple, 30 second crack at it for ya:
>
> : values: ( -- )
> begin bl parse
> 2dup s" }" compare while
> number? 0= abort" Not a number!" value
> repeat 2drop ;
>
> I'm sure this is full of holes, but it works.
>
> --
> Best regards,
> Jeff mailto:jma_at_mfire.com
>
>
> ----------------------------------------------------------------------
> 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
> ----------------------------------------------------------------------
>
>
----------------------------------------------------------------------
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 - 07:23:27 PST
This archive was generated by hypermail 2.2.0 : Tue Dec 02 2008 - 03:04:34 PST