The actual ability to represent the number in a given machine type is dependent on the size of the number.
If MinFlag is flase and the string has the format of 1, then DstType is set to SDS_INT, except if USFlag is set true, In which case DstType is set to SDS_UINT (unless the number is negative).
If MinFlag is false and the string has the format of 2, then DstType is set to SDS_DOUBLE.
If MinFlag is true, then the routine attempts to determine the smallest size of the required type which can be used to represent the number. If base type (INT or REAL) is determined as per when MinFlag is false. The system then tries to convert the value to a number of that type using ArgCvt. If this is successfull, then it looks at the resulting values and determines the smallest type which can be used to represet the number.
If the string is not a valid number (or when MinFlag is true, cannot be represented in the largest type) then DstType is set to ARG_STRING.
Any precedding white space in the string is ignored, but trailing white space is not allowed.
> | SrcAddr | char * | Address of the source data. |
---|---|---|---|
> | USFlag | int | If true, integers are unsigned unless they include a minus sign. If false, integers are always signed. |
> | MinFlag | int | If true, then find the smallest type of the appropiate class which can represent this time. E.g., use float instead of double if possible. This is a more expensive operation as ArgLook must invoke ArgCvt to do a conversion in order to determine this. |
< | DstType | SdsCodeType * | Type of the destination. |
! | status | Long int * | Modified status.
|
ErsPush | Ers | Increment error context. |
---|---|---|
ErsPop | Ers | Decrement error context. |
ErsAnnul | Ers | Annull error messages. |
ArgCvt | Arg | Convert a value from one type to another. |
isspace | CRTL | Is a character a which space character. |
isdigit | CRTL | Is a character a digit. |
Click here for the DRAMA home page and here for the AAO home page.
For more information, contact tony.farrell@mq.edu.au