/* * common.ch — Five compatibility shim for Harbour's common.ch * * Harbour ships #translate-based aliases for ISNIL / ISARRAY / * ISNUMBER / ISCHARACTER / ISLOGICAL / ISDATE / ISBLOCK / ISMEMO / * ISOBJECT. Five registers those as direct RTL symbols in * hbrtl/register.go (each points at the same Go function as its * HB_IS* twin), so they work without any preprocessor translation. * * The DEFAULT / UPDATE #xcommand forms use Five's optional-repeat * PP support — `DEFAULT a TO 1, b TO 2, c TO 3` expands into three * `IF x == NIL ; x := v ; ENDIF` statements. */ #ifndef HB_COMMON_CH_ #define HB_COMMON_CH_ #define TRUE .T. #define FALSE .F. #define YES .T. #define NO .F. #xcommand DEFAULT TO [, TO ] => IF == NIL ; := ; ENDIF [; IF == NIL ; := ; ENDIF ] #command UPDATE IF TO => IF ; := ; ENDIF #endif