Types

Common declarations used by the functions in this reference.

Boolean type

xdev-wtui.h
#ifndef XBOOL_DEFINED
   #define XBOOL_DEFINED
   typedef enum xBool
   {
      F = 0,
      T = ( ! 0 )
   } xBool;
#endif

Values and arrays

Array() creates an array of ITEM values. Indices start at 1. Use the typed ArrayGet* and ArraySet* functions to read and write elements. In the examples, AAdd() appends rows, AFill() fills a range, and ACopy() copies a range to another array.

Pass the numeric sentinel NIL for an omitted argument in functions such as AFill(). Use ItemType() == IT_NIL to check for an empty element and ItemRelease() to free the array.

Constants and macros

xdev-wtui.h
#define NIL ( -2147483647 - 1 )
#define IIF( condition, trueValue, falseValue ) ( ( condition ) ? ( trueValue ) : ( falseValue ) )
#define UNUSED( n ) ( ( void )( n ) )
#define MAX( left, right ) IIF( ( left ) > ( right ), left, right )
#define MIN( left, right ) IIF( ( left ) < ( right ), left, right )
#define     Array( ... ) Array( __VA_ARGS__, NIL ) /* Array( 3, 2 ): NIL ends the list by itself */
#define IT_NIL      0x00000u
#define IT_POINTER  0x00001u
#define IT_INTEGER  0x00002u
#define IT_DOUBLE   0x00008u
#define IT_DATE     0x00020u
#define IT_LOGICAL  0x00080u
#define IT_STRING   0x00400u
#define IT_BLOCK    0x01000u
#define IT_ARRAY    0x08000u
#define IT_UINT64   0x20000u
#define IT_INTEGRAL ( IT_INTEGER | IT_UINT64 )
#define IT_NUMERIC  ( IT_INTEGRAL | IT_DOUBLE )
#define IT_ANY      0xFFFFFFFFu