home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Database / CLIPR503.W96 / COMMON.C_ / COMMON.C
Encoding:
C/C++ Source or Header  |  1995-06-26  |  1.2 KB  |  38 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 MAX_STR 65519
  13.  
  14. #define TRUE  .T.
  15. #define FALSE .F.
  16. #define YES   .T.
  17. #define NO    .F.
  18.  
  19. #translate ISNIL( <v1> )         => ( <v1> == NIL )
  20. #translate ISARRAY( <v1> )       => ( valtype( <v1> ) == "A" )
  21. #translate ISBLOCK( <v1> )       => ( valtype( <v1> ) == "B" )
  22. #translate ISCHARACTER( <v1> )   => ( valtype( <v1> ) == "C" )
  23. #translate ISDATE( <v1> )        => ( valtype( <v1> ) == "D" )
  24. #translate ISLOGICAL( <v1> )     => ( valtype( <v1> ) == "L" )
  25. #translate ISMEMO( <v1> )        => ( valtype( <v1> ) == "M" )
  26. #translate ISNUMBER( <v1> )      => ( valtype( <v1> ) == "N" )
  27. #translate ISOBJECT( <v1> )      => ( valtype( <v1> ) == "O" )
  28.  
  29. #xcommand DEFAULT <v1> TO <x1> [, <vn> TO <xn> ]                        ;
  30.           =>                                                            ;
  31.           IF <v1> == NIL ; <v1> := <x1> ; END                           ;
  32.           [; IF <vn> == NIL ; <vn> := <xn> ; END ]
  33.  
  34. #command UPDATE <v1> IF <exp> TO <v2> ;
  35.          =>                           ;
  36.          IF <exp> ; <v1> := <v2> ; END
  37.  
  38.