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

Ron,
Great job filling in the blanks in my question - you hit the nail on the
head. I was trying to compile conditionals within a colon definition,
and your help gets me over a big hurdle that was in the way of
generalizing my code for several applications. The one instance that I
mentioned that worked, was not inside a colon definition. After several
years working with SwiftX, it is about time I understood what is going
on during compilation.
Leon, do you see any problem with using [ BarrVer 0= ], as Ron
illustrated below?
Thanks again,
David Graham
-----Original Message-----
From: swiftx-bounce_at_forth.com [mailto:swiftx-bounce_at_forth.com] On Behalf
Of Ron Oliver
Sent: Monday, November 17, 2003 2:08 PM
To: swiftx_at_forth.com
Subject: [swiftx] Re: Conditional compilation
....
In the above example, BarrVer will be compiled as a literal, so [IF]
doesn't have a value to operate on at compile time. You'd need to write
this as shown below to get what you want:
: ?BARRVER ( -- n )
[ BarrVer ] [IF] 1 [THEN]
( ... )
[ BarrVer 0= ] [IF] 0 [THEN] ;
-- Ron Oliver <roliver_at_openesque.com> ---------------------------------------------------------------------- swiftx_at_forth.com The SwiftX programming discussion email list To unsubscribe, send subject "unsubscribe" to swiftx-request_at_forth.com For list command help, send subject "help" to swiftx-request_at_forth.com Message archives are located at http://www.forth.com/archive/swiftx ---------------------------------------------------------------------- This list is a forum for SwiftX users. For product support and bug reports, please send email to support_at_forth.com ----------------------------------------------------------------------Received on Mon Nov 17 2003 - 20:56:05 PST
This archive was generated by hypermail 2.2.0 : Fri Dec 05 2008 - 03:04:22 PST