Gets the value of obj as a double-precision floating-point real number.
An exception is raised if the given object has the wrong Cos type.
double CosDoubleValue(CosObj obj);
obj | The object whose value is obtained. It must have type
CosInteger or CosReal ( CosFixed). The result is undefined if the real value is outside the range of floating-point numbers. |
obj, represented as a floating-point number. obj as a fixed-point real number. ASFixed CosFixedValue(CosObj obj);
obj | The object whose value is obtained. It must have type An exception is raised if the given object has the wrong Cos type. |
obj, represented as a fixed-point number. Gets the value of obj as a single-precision floating-point real number.
An exception is raised if the given object has the wrong Cos type.
float CosFloatValue(CosObj obj);
obj | The object whose value is obtained. It must have type
CosInteger or CosReal ( CosFixed). The result is undefined if the real value is outside the range of floating-point numbers. |
obj, represented as a floating-point number.
Gets the 64-bit integer value of a specified number object.
An exception is raised if the given object has the wrong Cos type.
ASInt64 CosInteger64Value(CosObj obj);
obj | The object whose integer value is obtained. It must have type
CosInteger or CosReal ( CosFixed). If it is CosReal, its value is rounded to the nearest integer. The result is undefined if the real value is outside the range of ASInt64 numbers. |
obj. ASInt32 CosIntegerValue(CosObj obj);
obj | The object whose integer value is obtained. It must have type An exception is raised if the given object has the wrong Cos type. |
obj. CosObj CosNewDouble(CosDoc dP, ASBool indirect, double value);
dP | The document in which the number is used.
|
indirect | If
true, it creates the real-number object as an indirect object, and sets the document dP object's PDDocNeedsSave flag (see PDDocFlags). If false, it creates the number as a direct object. |
value | The real number, represented as a double-precision floating-point number.
|
CosObj CosNewDoubleEx(CosDoc dP, ASBool indirect, double value, ASUns8 numSigDigs);
dP | The document in which the number is used.
|
indirect | If
true, it creates the real-number object as an indirect object, and sets the document dP object's PDDocNeedsSave flag (see PDDocFlags). If false, it creates the number as a direct object. |
value | The real number, represented as a double-precision floating-point number.
|
value | The maximum number of significant digits to use when this object is written to a file. Legal values are 6-13 for direct objects, 6-16 for indirect objects
|
CosObj CosNewFixed(CosDoc dP, ASBool indirect, ASFixed value);
dP | The document in which the number is used.
|
indirect | If
true, it creates the real-number object as an indirect object, and sets the document ( dP) object's PDDocNeedsSave flag (see PDDocFlags). If false, it creates the number as a direct object. |
value | The real number, represented as a fixed-point number.
|
CosObj CosNewFloat(CosDoc dP, ASBool indirect, float value);
dP | The document in which the number is used.
|
indirect | If
true, it creates the real-number object as an indirect object, and sets the document dP object's PDDocNeedsSave flag (see PDDocFlags). If false, it creates the number as a direct object. |
value | The real number, represented as a single-precision floating-point number.
|
CosObj CosNewInteger(CosDoc dP, ASBool indirect, ASInt32 value);
dP | IN The document in which the integer is used.
|
indirect | IN If
true, it creates the integer object as an indirect object, and sets the document dP object's PDDocNeedsSave flag (see PDDocFlags). If false, it creates the integer as a direct object. |
value | IN The value, represented as a 32-bit integer.
|
CosObj CosNewInteger64(CosDoc dP, ASBool indirect, ASInt64 value);
dP | IN The document in which the integer is used.
|
indirect | IN If
true, it creates the integer object as an indirect object, and sets the document dP object's PDDocNeedsSave flag (see PDDocFlags). If false, it creates the integer as a direct object. |
value | IN The value, represented as a 64-bit integer.
|
Tests whether the value of a Cos number is inside the range of ASFixed numbers, [-32768.0, +32768.0).
If so, the ASFixed value may be obtained by calling CosFixedValue().
If not, the floating-point value may be obtained by calling CosFloatValue().
It raises an exception if obj is not a number ( CosInteger or CosReal).
ASBool CosNumberIsWithinASFixedRange(CosObj obj);
obj | A Cos integer or real number.
|
Tests whether the value of a Cos number is inside the range of 32-bit integers, [-2147483648, +2147483647].
If so, the 32-bit value may be obtained by calling CosIntegerValue().
If not, the 64-bit value may be obtained by calling CosIntegerValue64().
It raises an exception if obj is not a number ( CosInteger or CosReal).
ASBool CosNumberIsWithinASInt32Range(CosObj obj);
obj | A Cos integer or real number.
|