RTC
®
5 PC Interface Board
Rev. 1.9 e
10 Commands And Functions
226
innovators for industry
10.1.7 Data Types
The following table defines the formats and ranges
of the different data types used by the
RTC
®
5 commands:
Pointer to Locations in the PC’s Memory
Some commands (e.g.
,
have pointers to locations in the PC’s memory as
parameters. In C# and Pascal, appropriate pointer
data types are herefore used (see import declara-
tions). In C and C++, the data type ULONG_PTR is
used for this pointer parameters. The ULONG_PTR
data type is defined in the C and C++ import decla-
rations as follows (ULONG_PTR = unsigned 32-bit
value for Win32-based applications, ULONG_PTR =
unsigned 64-bit value for Win64-based applications):
#if !defined(ULONG_PTR)
#if defined(WIN32)
#define ULONG_PTR UINT
#else
#define ULONG_PTR UINT64
#endif
#endif
Usually, the data type ULONG_PTR is also appropri-
ately defined in the WINDOWS header file
<BaseTsd.h>.
Data Format
Range
Pascal
C, C
++
C#
unsigned 32-bit value
[0; (2
32
–1)]
longword
unsigned long
uint
signed 32-bit value
[–2
31
; +(2
31
–1)]
longint
long
int
64-bit IEEE floating point
format
double
double
double
pointer to a null-terminated
ANSI string, 1 byte per char
4 Byte (for
Win32-based
applications)
8 Byte (for
Win64-based
applications)
pchar
char*
string