Defines |
#define | sat3_isreal(obj) sat3_checktype(obj,SAT_DOREAL) |
| Check object type on a given object.
|
#define | sat3_iscplx(obj) sat3_checktype(obj,SAT_DOCMP) |
| Check object type on a given object.
|
#define | sat3_isbint(obj) sat3_checktype(obj,SAT_DOBINT) |
| Check object type on a given object.
|
#define | sat3_iszint(obj) sat3_checktype(obj,SAT_DOINT) |
| Check object type on a given object.
|
#define | sat3_ischar(obj) sat3_checktype(obj,SAT_DOCHAR) |
| Check object type on a given object.
|
#define | sat3_iscstr(obj) sat3_checktype(obj,SAT_DOCSTR) |
| Check object type on a given object.
|
#define | sat3_ishxs(obj) sat3_checktype(obj,SAT_DOHXS) |
| Check object type on a given object.
|
#define | sat3_islist(obj) sat3_checktype(obj,SAT_DOLIST) |
| Check object type on a given object.
|
#define | sat3_ismatrix(obj) sat3_checktype(obj,SAT_DOMATRIX) |
| Check object type on a given object.
|
#define | sat3_isid(obj) sat3_checktype(obj,SAT_DOIDNT) |
| Check object type on a given object.
|
#define | sat3_istag(obj) sat3_checktype(obj,SAT_DOTAG) |
| Check object type on a given object.
|
#define | sat3_issymb(obj) sat3_checktype(obj,SAT_DOSYMB) |
| Check object type on a given object.
|
#define | sat3_isdir(obj) sat3_checktype(obj,SAT_DORRP) |
| Check object type on a given object.
|
Functions |
BOOL | sat3_checktype (SAT_OBJECT obj, unsigned int prolog) |
| Verify object type.
|
BOOL | sat3_checkargs (int n,...) |
| Check for multiple stack arguments.
|
void | sat3_checkargserror (int n,...) |
| Check for multiple stack arguments, and exit with an error if types don't match.
|
BOOL | sat3_ckn (int n) |
| Check for enough stack arguments, and protect the calculator stack.
|
void | sat3_cknerror (int n) |
| Check for enough stack arguments, protect the calculator stack, and exit with error.
|
BOOL | sat3_israrray (SAT_OBJECT obj) |
| Check object type on a given object.
|
BOOL | sat3_iscarray (SAT_OBJECT obj) |
| Check object type on a given object.
|
BOOL | sat3_isptr (SAT_OBJECT obj) |
| Check if SAT_OBJECT is a PTR to an object in ROM.
|
This group includes all functions used to identify objects.
void sat3_checkargserror |
( |
int |
n, |
|
|
|
... |
|
) |
| |
Check for multiple stack arguments, and exit with an error if types don't match.
Checks if there are at least 'n' arguments on the stack, then verifies the type of each argument using sat3_checktype. This function must be called with exactly 'n' arguments, each indicating the expected type on each level of the stack (level 1 first, then 2 and up).
- Parameters:
-
n | Number of arguments to expect on the stack. |
... | 'n' arguments with object type, given by one of the SAT_DOXXX constants, optionally adding one of the constants SAT_TAGGED or SAT_OPTIONAL_TAG. Can also be the constant SAT_ANY, which represents all objects, or the constant SAT_NUMERIC, which represents any numeric type, including bints, zints, hex strings, and reals. Some examples: SAT_TAGGED | SAT_DOREAL will check for a tagged real. SAT_OPTIONAL_TAG | SAT_DOREAL will accept either a real or a tagged real (the tag is optional). SAT_TAGGED | SAT_ANY accepts any tagged object, and is equivalent to SAT_DOTAG. |
- Returns:
- Returns only if *ALL* stack arguments match the given types, otherwise it does not return, but exits the program generating the proper error message.
- See also:
Check for enough stack arguments, and protect the calculator stack.
Checks if there are at least 'n' arguments on the stack, up to a maximum of 5 arguments. This function also sets the protection on the calculator stack, allowing proper stack recovery after an error generated by sat3_exiterror(). It also allows the C program effect to be undone later. This function *MUST* be called if sat3_exiterror() is used, for proper error handling. Even if no arguments are required, it is good practice to call this function (with n=0).
- Parameters:
-
n | Number of arguments to expect on the stack. |
- Returns:
- Returns TRUE if there are at least 'n' objects on the stack, FALSE otherwise.
- See also:
- sat3_cknerror sat3_sheckargs sat3_checkargserror sat3_exiterror
void sat3_cknerror |
( |
int |
n | ) |
|
Check for enough stack arguments, protect the calculator stack, and exit with error.
Checks if there are at least 'n' arguments on the stack, up to a maximum of 5 arguments. This function also sets the protection on the calculator stack, allowing proper stack recovery after an error generated by sat3_exiterror(). It also allows the C program effect to be undone later in the calculator. This function *MUST* be called if sat3_exiterror() is used, for proper error handling. Even if no arguments are required, it is good practice to call this function (with n=0).
- Parameters:
-
n | Number of arguments to expect on the stack. |
- Returns:
- Returns only if there are at least 'n' objects on the stack, otherwise it does not return, but it exits the program with the proper error message (uses sat3_exiterror).
- See also:
- sat3_ckn sat3_sheckargs sat3_checkargserror sat3_exiterror