Re: #;



Kaz Kylheku <kkylheku@xxxxxxxxx> wrote:
+---------------
| > I have seen many examples using #+nil for this
|
| That and #+IGNORE will break if someone adds IGNORE or NIL to
| *FEATURES*.
|
| What will not break is #+(or). This actually has the meaning of
| ignoring the following expression no matter what.
+---------------

I actually prefer Erik Naggum's suggestion of #-(and) for that,
since the minus implies "turn it off" to me more than #+(or)
[which just feels "backwards"]. That also lets you change only
one character to turn it back on with #+(and), and again the
plus implies "on" to me [rather than using #-(or) for "on"].

But for some time now I've been using an even simpler pair,
namely, #+- to turn a form "off" [mnemonic: "from on to off"
or a "falling edge"] and #-+ to turn a form "on" [mnemonic:
"from off to on" or a "rising edge"], e.g.:

> (list 1 2 #+- 3 4 #-+ 5 6)

(1 2 4 5 6)
>

This will work provided no-one ever puts :+ or :- onto *features*,
which is highly unlikely. (IMHO.)


-Rob

-----
Rob Warnock <rpw3@xxxxxxxx>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607

.



Relevant Pages

  • Re: if (pointer) ?
    ... Kaz Kylheku writes: ... value that is not NIL serves as false. ... Correction: nil is false, ...
    (comp.lang.c)
  • Re: [FPC BUG] 2.0.2 GO32V2 version, erroneous length handling of the zero parameter (filename)
    ... dos_env,cp: pchar; ... inc); {skip to next character} ... >>>In the below it have halt, ... if (dos_argv0 = nil) then halt; ...
    (comp.lang.pascal.misc)
  • Re: I/O in Lisp
    ... Greek, it might be more useful for you to use ordinary ... >>more than one character at the destination case. ... SBCL and CMUCL, for example. ... => NIL ...
    (comp.lang.lisp)
  • Re: what is the difference between = and ==
    ... Character, date, logical, memo, NIL, numeric ... z Character: The comparison is based on the underlying ASCII ... compared to a value of any other data type. ... SET EXACT OFF ...
    (comp.lang.clipper)
  • Re: read-char vs. read-char-no-hang
    ... input stream or nil if there is none available. ... char does not return when no character is available. ... while READ-CHAR-NO-HANG would return NIL. ...
    (comp.lang.lisp)