Sign in Join
FPDoc Onlineexperiment

ctypes unit

Common C type definitions.

The ctypes unit contains the definitions of commonly found C types. It can be used when interfaces to C libraries need to be defined. The types here are correct on all platforms, 32 or 64 bit.

The main advantage of using this file is to make sure that all C header import units use the same definitions for basic C types.

The h2pas program can include the ctypes unit automatically in the units it generates. The -C command-line switch can be used for this.

Types

cbooltypeC boolean (longbool).
cchartypeC character type (No signedness specification, 8 bit integer).
cdoubletypeDouble precision floating point type (double).
cfloattypeSingle precision floating point type (single).
cinttypeC integer (commonly 32 bit).
cint16type16-bit signed integer.
cint32type32-bit signed integer (commonly: int).
cint64type64-bit integer.
cint8type8-bit signed integer.
clongtypelong integer (32/64 bit, depending on CPU register size).
clongdoubletypeLong precision floating point type (extended/double, depending on CPU).
clonglongtypeLong (64-bit) integer.
coff_ttypeGeneric type to indicate offset.
cschartypeC signed character type (8 bit signed integer).
cshorttypeShort integer (16 bit).
csignedtypeSigned integer (commonly 32 bit).
csinttypeSigned integer (commonly 32 bit).
csize_ttypeGeneric type to contain a size of all kinds of structures.
cslongtypeSigned long integer (32/64 bit, depending on CPU register size).
cslonglongtypeSigned long (64-bit) integer.
csshorttypeShort signed integer (16 bit).
cuchartypeC unsigned character type (8 bit unsigned integer).
cuinttypeUnsigned integer (commonly 32 bit).
cuint16type16-bit unsigned integer.
cuint32type32-bit unsigned integer.
cuint64typeUnsigned 64-bit integer.
cuint8type8-bit unsigned integer.
culongtypeUnsigned long integer (32/64 bit, depending on CPU register size).
culonglongtypeUnsigned long (64-bit) integer.
cunsignedtypeUnsigned integer (commonly 32 bit).
cushorttypeShort unsigned integer (16 bit).
pcbooltypePointer to cbool type.
pcchartypePointer to cchar type.
pcdoubletypePointer to cdouble type.
pcfloattypePointer to cfloat type.
pcinttypePointer to cint type.
pcint16typePointer to cint16 type.
pcint32typePointer to cint32 type.
pcint64typePointer to cint64 type.
pcint8typePointer to cint8 type.
pclongtypePointer to clong type.
PclongdoubletypePointer to clongdouble type.
pclonglongtypePointer to clonglong type.
pcschartypePointer to cschar type.
pcshorttypePointer to cshort type.
pcsignedtypePointer to csigned type.
pcsinttypePointer to csint type.
pcsize_ttypePointer to generic size type.
pcslongtypePointer to cslong type.
pcslonglongtypePointer to cslonglong type.
pcsshorttypePointer to csshort type.
pcuchartypePointer to cuchar type.
pcuinttypePointer to cuint type.
pcuint16typePointer to cuint16 type.
pcuint32typePointer to cuint32 type.
pcuint64typePointer to cuint64 type.
pcuint8typePointer to cuint8 type.
pculongtypePointer to culong type.
pculonglongtypePointer to culonglong type.
pcunsignedtypePointer to cunsigned type.
pcushorttypePointer to cushort type.

Uses

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.