More about C Data types
C Data Types found in Guardian C/C++ Programmers manual
#pragma XMEM default for TNS C compilers, specifies a 32 bit model. NOXMEM specifies a 16 bit model.
#pragma NOWIDE changes the size of int, long and short to 16 bit. Only valid for #pragma NOXMEM which we don't use.
To call Guardian Procedures you should include
#pragma EXTENSIONS
#include
In a scrape with compatability problems, use the #pragma OLDCALLs. This specifies the pre C00 parameter order for old programs.

Best practices.
Don't use int. use long or short instead.
Put environment specific functions in an #include .
Avoid HP specific, and C extensions to data types if possible.
Use unsigned only for short and long.

Abbreviation Long forms Usage
bool bool * Non Ansi
char char Ansi - 1 byte (8 bits)
short short Ansi - 16 bit integer. Preferred usage.
signed short
short int
signed short int
long long 32 bit integer. Preferred usage.
signed long
long int Don't use this
signed long int Don't use this
int int, signed, signed int 32 bits, 16 bits with nowide. Don't use this. Use short instead.
unsigned short unsigned short 16 bit integer
unsigned short int
unsigned unsigned
unsigned int
unsigned long unsigned long
unsigned long int
unsigned long long unsigned long long Non Ansi. unsigned 64 bit integer.
long long long long 64 bit. Used when decimal numbers are is followed by ll or LL modifier
decimal decimal Non Ansi. Only for programs with #pragma SQL and #include
float float Single precision
float float Single precision
double double double Double precision
long double long double
Data Types
char 1 byte
int 16 bit integer
float single precision
double double precision
short 16 bit integer
long 32 bit integer
signed +/-
unsigned +
*int, *float pointer to int, float
enum enumeration constant
const Unchanging constant
extern Declare an external variable
register Declare a register
static Local variable
void No value
structure Define a structure
typedef x Create a name of a data type
sizeof x Size of an object
sizeof (x) Size of a data type
&var Use the variable at this address
Friday, July 24, 2009 5:48:21 PM, From: jim, To: Stories