home *** CD-ROM | disk | FTP | other *** search
/ BUG 4 / BUGCD1997_05.BIN / aplic / clip4win / clip4win.exe / C4W30E.HUF / INCLUDE / VO.CH < prev    next >
Text File  |  1995-08-02  |  1KB  |  58 lines

  1. //    vo.ch - Some VO compatibility
  2. //
  3. //    Written by:    John M. Skelton,  Oct-94.
  4. //
  5. //    Copyright (C) 1994 Skelton Software, Kendal Cottage, Hillam, Leeds LS25 5HP, UK.
  6. //    All Rights Reserved.
  7. //
  8. //    Part of Clip-4-Win.
  9.  
  10. #ifndef    C4W_VO_CH
  11. #define    C4W_VO_CH
  12.  
  13. // Crude AS <type> syntax:
  14.  
  15. //#xcommand LOCAL <v,...> AS <type:ANY,ARRAY,BLOCK,BYTE,CODEBLOCK,DATE,    ;
  16. //                            DWORD,FLOAT,INT,LOGIC,LONG,LONGINT,OBJECT,    ;
  17. //                            PSZ,PTR,REAL4,REAL8,SHORT,SHORTINT,STRING,    ;
  18. //                            SYMBOL,USUAL,WORD>                ;
  19. //       => LOCAL <v>
  20.  
  21. #xcommand LOCAL <v,...> AS <type>                    ;
  22.        => LOCAL <v>
  23.  
  24. #xcommand STATIC GLOBAL <v,...> [AS <type>]                ;
  25.        => STATIC <v>
  26.  
  27. #xcommand DEFINE <v> := <e> [AS <type>]                    ;
  28.        => #DEFINE <v> <e>
  29.  
  30. #ifndef    FALSE
  31. #define    FALSE    .F.
  32. #endif
  33.  
  34. #ifndef    TRUE
  35. #define    TRUE    .T.
  36. #endif
  37.  
  38. #define    ArrayNew    Array
  39.  
  40. #xtranslate AScanExact( <a>, <x> )    =>    AScan( <a>, {|_e| _e == <x>} )
  41.  
  42. #xtranslate AEvalOld        =>    AEval
  43.  
  44. #xtranslate ClassName(<o>)    =>    <o>:ClassName
  45.  
  46. #xtranslate Default(@<v>, <x>)    =>    <v> := IIF(<v> == NIL, <x>, <v>)
  47.  
  48. #xtranslate IsObject(<x>)    =>    (ValType(<x>) == "O")
  49.  
  50. #xtranslate MemAlloc(<n>)    =>    Space(<n>)
  51. #xtranslate MemFree(<p>)    =>    <p> := NIL
  52.  
  53. #xtranslate PSZ(<c>)        =>    (<c>)
  54. #xtranslate PSZ2String(<c>)    =>    Left(<c>, At(Chr(0), <c>) - 1)
  55. #xtranslate String2PSZ(<c>)    =>    (<c> + Chr(0))
  56.  
  57. #endif    // C4W_VO_CH
  58.