
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FlexFile Reference Guide - <b>a_type()</b>
[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
A_TYPE()
Return the type of an array
-------------------------------------------------------------------------------
Syntax
A_TYPE( <aTarget> ) -> cType
Arguments
<aTarget> is the array whose type is returned.
Returns
A_TYPE() returns the type of the <aTarget> as a character
string.
Description
A_TYPE() returns the type of a FlexFile array. If the array is of
integer type and was declared as unsigned, then a "U" will precede
the type.
The return value is a character string such as "L" for a long
integer or "UL" for an unsigned long integer.
Appendix C lists all the array types and sizes.
Examples
// Setup seven variables of differing array types.
LOCAL aLogical ,;
aChar ,;
aTiny ,;
auTiny ,;
aInteger ,;
auInteger ,;
aLong ,;
auLong ,;
aString ,;
aFloat ,;
aDouble
// Declare an array for each possible type.
aLogical = A_DECLARE( 'B', 10 )
aChar = A_DECLARE( 'C', 10 )
aTiny = A_DECLARE( 'T', 10 )
auTiny = A_DECLARE( 'UT', 10 )
aInteger = A_DECLARE( 'I', 10 )
auInteger = A_DECLARE( 'UI', 10 )
aLong = A_DECLARE( 'L', 10 )
auLong = A_DECLARE( 'UL', 10 )
aString = A_DECLARE( 'S', 10 )
aFloat = A_DECLARE( 'F', 10 )
aDouble = A_DECLARE( 'D', 10 )
// Show the type of each array
? A_TYPE( aLogical ) // Result: B
? A_TYPE( aChar ) // Result: C
? A_TYPE( aTiny ) // Result: T
? A_TYPE( auTiny ) // Result: UT
? A_TYPE( aInteger ) // Result: I
? A_TYPE( auInteger) // Result: UI
? A_TYPE( aLong ) // Result: L
? A_TYPE( auLong ) // Result: UL
? A_TYPE( aString ) // Result: S
? A_TYPE( aFloat ) // Result: F
? A_TYPE( aDouble ) // Result: D
See Also: A_DECLARE()
Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson