home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1993 #2 / Image.iso / clipper / 52capi.zip / COMMON.CH < prev    next >
Text File  |  1993-02-15  |  1KB  |  35 lines

  1. /***
  2. *
  3. *  Common.ch
  4. *
  5. *  Commonly used definitions
  6. *
  7. *  Copyright (c) 1993, Computer Associates International, Inc.
  8. *  All rights reserved.
  9. *
  10. */
  11.  
  12. #define TRUE  .T.
  13. #define FALSE .F.
  14. #define YES   .T.
  15. #define NO    .F.
  16.  
  17. #translate ISNIL( <v1> )         => ( <v1> == NIL )
  18. #translate ISARRAY( <v1> )       => ( valtype( <v1> ) == "A" )
  19. #translate ISBLOCK( <v1> )       => ( valtype( <v1> ) == "B" )
  20. #translate ISCHARACTER( <v1> )   => ( valtype( <v1> ) == "C" )
  21. #translate ISDATE( <v1> )        => ( valtype( <v1> ) == "D" )
  22. #translate ISLOGICAL( <v1> )     => ( valtype( <v1> ) == "L" )
  23. #translate ISMEMO( <v1> )        => ( valtype( <v1> ) == "M" )
  24. #translate ISNUMBER( <v1> )      => ( valtype( <v1> ) == "N" )
  25. #translate ISOBJECT( <v1> )      => ( valtype( <v1> ) == "O" )
  26.  
  27. #xcommand DEFAULT <v1> TO <x1> [, <vn> TO <xn> ]                        ;
  28.           =>                                                            ;
  29.           IF <v1> == NIL ; <v1> := <x1> ; END                           ;
  30.           [; IF <vn> == NIL ; <vn> := <xn> ; END ]
  31.  
  32. #command UPDATE <v1> IF <exp> TO <v2> ;
  33.          =>                           ;
  34.          IF <exp> ; <v1> := <v2> ; END
  35.