Why not?
: FOO ( d1 -- d2) 100 S>D D+ ;
or
: FOO ( d1 -- d2) 100 0 D+ ;
David
> Double number conversion is indeed used while compiling. Without it you
> could not enter double literals.
>
> : FOO ( d1 -- d2) 100. D+ ;
>
> > -----Original Message-----
> > From: swiftx-bounce_at_forth.com [mailto:swiftx-bounce_at_forth.com]On Behalf
> > Of David Graham
> > Sent: Friday, June 01, 2001 12:17 PM
> > To: swiftx_at_forth.com
> > Subject: [swiftx] Re: Why is 4+ legal?
> >
> >
> >
> > Kevin and Elizabeth,
> > Thanks for the feedback. I did find the explanation in the SwiftX
> > documentation. It is neat to know that a double value
> > -101 can be entered as -1..:-0-:..1-. I can write some really
> > cryptic code
> > with that <g>.
> >
> > My problem was not being aware that there were double number flags, i.e.
> > punctuation. I graduated to SwiftX from Vesta and New Micro
> > Forth that had
> > dedicated words for the conversion, such as S>D. That works fine with
> > source code, but I can see that the SwiftX method would be convenient
> > dealing with user input. I had expected 4+ would have
> generated an error
> > message alerting me to the typo, and was curious why SwiftX did not
> > complain. It would help me avoid my typos if SwiftX disabled the double
> > number flags while compiling, where they are not really needed, and only
> > used them when interpreting user input, but I can live with how
> it is now
> > that I understand what is going on.
> >
> > David Graham
> >
> > ----------------------------------------------------------------------
> > swiftx_at_forth.com The SwiftX programming discussion email list
> > To unsubscribe, send subject "unsubscribe swiftx" to listar_at_forth.com
> > For help with listar commands, send subject "help" to listar_at_forth.com
> > Archives are located at http://www.forth.com/swiftx -- check them out!
>
> ----------------------------------------------------------------------
> swiftx_at_forth.com The SwiftX programming discussion email list
> To unsubscribe, send subject "unsubscribe swiftx" to listar_at_forth.com
> For help with listar commands, send subject "help" to listar_at_forth.com
> Archives are located at http://www.forth.com/swiftx -- check them out!
----------------------------------------------------------------------
swiftx_at_forth.com The SwiftX programming discussion email list
To unsubscribe, send subject "unsubscribe swiftx" to listar_at_forth.com
For help with listar commands, send subject "help" to listar_at_forth.com
Archives are located at http://www.forth.com/swiftx -- check them out!
Received on Fri Jun 01 2001 - 13:22:59 PDT
Subscribe to our e-mail list service. It's free for all SwiftForth and SwiftX users!
This archive was generated 08-Feb-2012. Archive updated nightly.