/* hex.i ** ** Goes with hex.p ** Written by Greg Higgins ** PEG Holdings, Inc. ** higgins@peg.com ** ** FORWARD reference for hex.p functions ** ** This is used in several ways ** ** {hex.i} is just a forward declaration of hex2dec and dec2hex ** and is not necessary if you include hex.p and use the ** functions after the include of hex.p ** ** {hex.i &HEX_PROC="h_hexproc"} means you've done something like ** ** define variable h_hexproc as handle no-undo. ** run hex.p persistent set h_hexproc. ** ** {hex.i &MV_HEX2DEC="newhex2dec" &HEX_PROC="h_hexproc"} means you've done ** something like the above plus you've already got a function ** named hex2dec so you're going to call this function by the ** name newhex2dec . ** ** You can also change the name of dec2hex using MV_DEC2HEX ** ** Is all this clear? ** ** */ &if DEFINED(PEGH_HEX_I) &then &else FUNCTION &if defined (HEX_PROC) gt 0 and defined (MV_HEX2DEC) gt 0 &then {&MV_HEX2DEC} &else hex2dec &endif RETURNS decimal (INPUT hexstr AS character) &if defined(HEX_PROC) &then &if defined(MV_HEX2DEC) &then MAP TO hex2dec &endif IN {&HEX_PROC} &else FORWARD &endif . FUNCTION &if defined (HEX_PROC) gt 0 and defined (MV_DEC2HEX) gt 0 &then {&MV_DEC2HEX} &else dec2hex &endif RETURNS character (INPUT decnum AS decimal) &if defined(HEX_PROC) &then &if defined (MV_DEC2HEX) &then MAP TO dec2hex &endif IN {&HEX_PROC} &else FORWARD &endif . &GLOB PEGH_HEX_I &endif