Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Forth > What is the Com...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 3788 of 4173
Post > Topic >>

What is the Comus for ...? [OPTIONAL]

by Bruce McFarling <agila61@[EMAIL PROTECTED] > Feb 29, 2008 at 03:40 PM

[DEFINED] token

searches for token and if in scope returns TRUE.

[UNDEFINED] token

searches for token and if in scope returns FALSE.

Today I found myself doing the following for a compilation parameter
where I wish to escape to a default if the compilation parameter is
not defined, but also wish to allow the compilation parameter to be
set to FALSE to drop through the the same default.

This results in:

[DEFINED] no-sp-large [IF] no-sp-large [IF]
    \ simpler definitions if large shuttlepads are excluded
[ELSE]
    \ more complex definitions if large shuttlepads are allowed
[THEN] [THEN]

.... and it occurred to me that it would be straightforward to search
for the word and execute it if found, returning FALSE if not found ...
so that intrinsically, if its a VALUE or is a dynamic check whether
something is sup****ted, it will be defined to return FALSE for the
default case. Such a word might be called [OPTIONAL]

[OPTIONAL] no-sp-large [IF]
    \ simpler definitions if large shuttlepads are excluded
[ELSE]
    \ more complex definitions if large shuttlepads are allowed
[THEN]

.... however, if I ran a benefit from it, I am confident others have,
and it is just a small wrinkle on the vanilla Forth-94 standard for
[DEFINED], so I was thinking that it was probably a Comus-type word.
 




 1 Posts in Topic:
What is the Comus for ...? [OPTIONAL]
Bruce McFarling <agila  2008-02-29 15:40:18 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 22:22:06 CDT 2008.