[HARLEQUIN][Common Lisp HyperSpec (TM)] [Previous][Up][Next]


24.1.2.1.1 Examples of Feature Expressions

For example, suppose that in implementation A, the features spice and perq are present, but the feature lispm is not present; in implementation B, the feature lispm is present, but the features spice and perq are not present; and in implementation C, none of the features spice, lispm, or perq are present. The next figure shows some sample expressions, and how they would be read[2] in these implementations.

(cons #+spice "Spice" #-spice "Lispm" x)                             
                                                      
in implementation A ...  (CONS "Spice" X)             
in implementation B ...  (CONS "Lispm" X)             
in implementation C ...  (CONS "Lispm" X)             
                                                      
(cons #+spice "Spice" #+LispM "Lispm" x)                             
                                                      
in implementation A ...  (CONS "Spice" X)             
in implementation B ...  (CONS "Lispm" X)             
in implementation C ...  (CONS X)                     
                                                      
(setq a '(1 2 #+perq 43 #+(not perq) 27))                             
                                                      
in implementation A ...  (SETQ A '(1 2 43))           
in implementation B ...  (SETQ A '(1 2 27))           
in implementation C ...  (SETQ A '(1 2 27))           
                                                      
(let ((a 3) #+(or spice lispm) (b 3)) (foo a))                             
                                                      
in implementation A ...  (LET ((A 3) (B 3)) (FOO A))  
in implementation B ...  (LET ((A 3) (B 3)) (FOO A))  
in implementation C ...  (LET ((A 3)) (FOO A))        
                                                      
(cons #+Lispm "#+Spice" #+Spice "foo" #-(or Lispm Spice) 7 x)                             
                                                      
in implementation A ...  (CONS "foo" X)               
in implementation B ...  (CONS "#+Spice" X)           
in implementation C ...  (CONS 7 X)                   

Figure 24-1. Features examples


[Starting Points][Contents][Index][Symbols][Glossary][Issues]
Copyright 1996, The Harlequin Group Limited. All Rights Reserved.