Hi Tomas,
> well, #+NIL(...) seems a bit long, but it is actually a conditional
> comment where the condition is NIL in this case.
Ah, I see! Well, in PicoLisp there is also a kind of "conditional
compilation" which I use quite frequently. It is the read macro operator
'~' (tilde) in combination with 'as'.
...
~(as <expression>
body
... )
...
The list with 'body' will not be included into the code if 'expression'
evaluates to NIL. I use this sometimes to exclude whole tabs from the
GUI, depending on the object being shown.
Then there is one more way of "commenting": As it is a feature of 'load'
that it will terminate reading the input stream when 'NIL' is read, you
can have 'load' ignore the complete rest of a file by simply writing a
'NIL' at some place.
In combination with the backquote read macro this can be also done
conditionally. If you look, for example, at the end of "lib/form.l",
you'll see
`*Dbg
(noLint 'gui)
(noLint 'choDlg 'gui)
(noLint 'jsForm 'action)
# vi:et:ts=3:sw=3
This means that these lines are only read if '*Dbg' does not evaluate
to 'NIL'.
Cheers,
- Alex
--
UNSUBSCRIBE: mailto:[email protected]?subject=unsubscribe