home *** CD-ROM | disk | FTP | other *** search
- '***********************************************************************
- ' StdError.rlz
- '
- ' Standard Error Library
- '
- ' Copyright ⌐ 1991-1992 Computer Associates International, Inc.
- ' All rights reserved.
- '
- '***********************************************************************
-
- IF QVar(%%StdError, _Defined) THEN
- EXIT MACRO
- END IF
- %%StdError = 1
-
- PROC ECType(ggActual, tExpected, rsParamNum)
- IF Not(QVar(ggActual, tExpected)) THEN
- IF Not(QVar(ggActual, _Defined)) THEN
- IF rsParamNum > 0 THEN
- STOP USING Sprint("Parameter P(0): Undefined value.", rsParamNum), 2
- ELSE
- STOP USING Sprint("Modifier P(0): Undefined value.", -rsParamNum), 2
- END IF
- ELSE
- IF rsParamNum > 0 THEN
- STOP USING Sprint("Parameter P(0): Incorrect type.", rsParamNum), 2
- ELSE
- STOP USING Sprint("Modifier P(0): Incorrect type.", -rsParamNum), 2
- END IF
- END IF
- END IF
- END PROC
-
- PROC ECProto(rsNumParams, rsMax, asProto)
- IF rsNumParams > rsMax THEN
- STOP USING "Syntax: " + asProto, 2
- END IF
- END PROC
-
- PROC ECMods(rsNumMods, rsMax, asProto)
- IF rsNumMods > rsMax THEN
- STOP USING "Syntax: " + asProto, 2
- END IF
- END PROC
-
- PROC ECRange(rsActual, rsMin, rsMax, rsParamNum)
- IF rsActual < rsMin OR rsActual > rsMax THEN
- IF rsParamNum > 0 THEN
- STOP USING Sprint("Parameter P(0) is out of range P(0)..P(0).", rsParamNum, rsMin, rsMax), 2
- ELSE
- STOP USING Sprint("Modifier P(0) is out of range P(0)..P(0).", -rsParamNum, rsMin, rsMax), 2
- END IF
- END IF
- END PROC
-
- PROC ECCond(rsCond, asMsg)
- IF Not(rsCond) THEN
- STOP USING asMsg, 2
- END IF
- END PROC