PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Overview
  • Converting C types
  • Simple types used in return value or in input parameter
  • Simple types in output parameter
  • Simple array in input parameter
  • Simple array in return value
  • Simple array in output parameter
  • Using strings
  • Using arrays of strings
  • Strings and structures
  • Simple array in a structure
  • Class
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Overview
Depending on the type of programming, it may be useful to know the correspondence between the types used in C and the types used in WLanguage.
The table below presents this correspondence.
Converting C types

Simple types used in return value or in input parameter

C typeC commentWLanguage type
char, int81 byte1-byte integer
byte, uint81 byteunsigned integer on 1 byte
short, int162 bytesinteger on 2 bytes
word, uint162 bytesunsigned integer on 2 bytes
long, int 32, int (in 32 bits)4 bytesinteger [on 4 bytes]
dword, uint324 bytesunsigned integer on 4 bytes
longlong, int648 bytes8-byte integer
ulonglong, dwordlong, uint648 bytesunsigned integer on 8 bytes
float4 bytes4-byte real
double8 bytesreal [on 8 bytes]

Simple types in output parameter

C typeC commentWLanguage type
char*, int8*4 bytes in 32 bits, 8 bytes in 64 bitssystem integer (containing the address of an integer on 1 byte)
byte*, uint8*4 bytes in 32 bits, 8 bytes in 64 bitssystem integer (containing the address of an unsigned integer on 1 byte)
short*, int16*4 bytes in 32 bits, 8 bytes in 64 bitssystem integer (containing the address of an integer on 2 bytes)
word*, uint16*4 bytes in 32 bits, 8 bytes in 64 bitssystem integer (containing the address of an unsigned integer on 2 bytes)
long*, int 32*, int* (in 32 bits)4 bytes in 32 bits, 8 bytes in 64 bitssystem integer (containing the address of an integer [on 4 bytes])
dword*, uint32*4 bytes in 32 bits, 8 bytes in 64 bitssystem integer (containing the address of an unsigned integer [on 4 bytes])
longlong*, int64*4 bytes in 32 bits, 8 bytes in 64 bitssystem integer (containing the address of an integer on 8 bytes)
ulonglong*, dwordlong*, uint64*4 bytes in 32 bits, 8 bytes in 64 bitssystem integer (containing the address of an unsigned integer on 8 bytes)
float*4 bytes in 32 bits, 8 bytes in 64 bitssystem integer (containing the address of a real [on 4 bytes])
double*4 bytes in 32 bits, 8 bytes in 64 bitssystem integer (containing the address of a real on 8 bytes)

Simple array in input parameter

C typeC commentWLanguage type
char*, int8*4 bytes in 32 bits, 8 bytes in 64 bitssystem integer (containing the address of an array of <N> integers on 1 byte or the address of a string)
byte*, uint8*4 bytes in 32 bits, 8 bytes in 64 bitssystem integer (containing the address of an array of <N> unsigned integers on 1 byte or the address of a buffer)
short*, int16*4 bytes in 32 bits, 8 bytes in 64 bitssystem integer (containing the address of an array of <N> integers on 2 bytes)
word*, uint16*4 bytes in 32 bits, 8 bytes in 64 bitssystem integer (containing the address of an array of <N> unsigned integers on 2 bytes)
long*, int 32*, int* (in 32 bits)4 bytes in 32 bits, 8 bytes in 64 bitssystem integer (containing the address of an array of <N> [4-byte] integers)
dword*, uint32*4 bytes in 32 bits, 8 bytes in 64 bitssystem integer (containing the address of an array of <N> unsigned [4-byte] integers)
longlong*, int64*4 bytes in 32 bits, 8 bytes in 64 bitssystem integer (containing the address of an array of <N> integers on 8 bytes)
ulonglong*, dwordlong*, uint64*4 bytes in 32 bits, 8 bytes in 64 bitssystem integer (containing the address of an array of <N> unsigned integers on 8 bytes)
float*4 bytes in 32 bits, 8 bytes in 64 bitssystem integer (containing the address of an array of <N> reals [on 4 bytes])
double*4 bytes in 32 bits, 8 bytes in 64 bitssystem integer (containing the address of an array of <N> reals on 8 bytes)

Simple array in return value

C typeC commentWLanguage typeWLanguage comment
char*, int8*4 bytes in 32 bits , 8 bytes in 64 bits + size <N> to knowsystem integeraddress of an array of <N> integers on 1 byte or address of an [ANSI] string. Use Transfer or StringRetrieve to retrieve the values.
byte*, uint8*4 bytes in 32 bits , 8 bytes in 64 bits + size <N> to knowsystem integeraddress of an array of <N> unsigned integers on 1 byte or address of a buffer. Use Transfer or StringRetrieve to retrieve the values.
short*, int16*4 bytes in 32 bits , 8 bytes in 64 bits + size <N> to knowsystem integeraddress of an array of <N> integers on 2 bytes. Use Transfer to retrieve the values.
word*, uint16*4 bytes in 32 bits , 8 bytes in 64 bits + size <N> to knowsystem integeraddress of an array of <N> unsigned integers on 2 bytes. Use Transfer to retrieve the values.
long*, int 32*, int* (in 32 bits)4 bytes in 32 bits , 8 bytes in 64 bits + size <N> to knowsystem integeraddress of an array of <N> integers [on 4 bytes]. Use Transfer to retrieve the values.
dword*, uint32*4 bytes in 32 bits , 8 bytes in 64 bits + size <N> to knowsystem integeraddress of an array of <N> unsigned integers on 4 bytes. Use Transfer to retrieve the values.
longlong*, int64*4 bytes in 32 bits , 8 bytes in 64 bits + size <N> to knowsystem integeraddress of an array of <N> unsigned integers on 8 bytes. Use Transfer to retrieve the values.
ulonglong*, dwordlong*, uint64*4 bytes in 32 bits , 8 bytes in 64 bits + size <N> to knowsystem integeraddress of an array of <N> unsigned integers on 8 bytes. Use Transfer to retrieve the values.
float*4 bytes in 32 bits , 8 bytes in 64 bits + size <N> to knowsystem integeraddress of an array of <N> reals on 4 bytes. Use Transfer to retrieve the values.
double*4 bytes in 32 bits , 8 bytes in 64 bits + size <N> to knowsystem integeraddress of an array of <N> reals [on 8 bytes]. Use Transfer to retrieve the values.

Simple array in output parameter

C typeC commentWLanguage typeWLanguage comment
char**, int8**4 bytes in 32 bits , 8 bytes in 64 bits + size <N> to knowsystem integeraddress of another system integer containing the address of an array of <N> integers on 1 byte or the address of an [ANSI] string. Use Transfer or StringRetrieve to retrieve the values.
byte**, uint8**4 bytes in 32 bits , 8 bytes in 64 bits + size <N> to knowsystem integeraddress of another system integer containing the address of an array of <N> unsigned integers on 1 byte or the address of a buffer. Use Transfer or StringRetrieve to retrieve the values.
short**, int16**4 bytes in 32 bits, 8 bytes in 64 bits + csize <N> to knowsystem integeraddress of another system integer containing the address of an array of <N> integers on 2 bytes. Use Transfer to retrieve the values.
word**, uint16**4 bytes in 32 bits , 8 bytes in 64 bits + size <N> to knowsystem integeraddress of another system integer containing the address of an array of <N> unsigned integers on 2 bytes. Use Transfer to retrieve the values.
long**, int 32**, int** (in 32 bits)4 bytes in 32 bits , 8 bytes in 64 bits + size <N> to knowsystem integeraddress of another system integer that contains the address of an array of <N> [4-byte] integers + Transfer
dword**, uint32**4 bytes in 32 bits , 8 bytes in 64 bits + size <N> to knowsystem integeraddress of another system integer containing the address of an array of <N> unsigned integers on 4 bytes. Use Transfer to retrieve the values.
longlong**, int64**4 bytes in 32 bits , 8 bytes in 64 bits + size <N> to knowsystem integeraddress of another system integer containing the address of an array of <N> integers on 8 bytes. Use Transfer to retrieve the values.
ulonglong**, dwordlong**, uint64**4 bytes in 32 bits , 8 bytes in 64 bits + size <N> to knowsystem integeraddress of another system integer containing the address of an array of <N> unsigned integers on 8 bytes. Use Transfer to retrieve the values.
float**4 bytes in 32 bits , 8 bytes in 64 bits + size <N> to knowsystem integeraddress of another system integer containing the address of an array of <N> reals on 4 bytes. Use Transfer to retrieve the values.
double**4 bytes in 32 bits , 8 bytes in 64 bits + size <N> to knowsystem integeraddress of another system integer containing the address of an array of <N> reals [on 8 bytes]. Use Transfer to retrieve the values.

Using strings

  • Read-only strings in input parameter
    C typeC commentWLanguage type
    char*read-only ANSI stringsystem integer (containing the address of an ANSI string: &string[ANSI])
    wchar*read-only UNICODE stringsystem integer (containing the address of a Unicode string: &string unicode)
  • Read/Write strings in input parameter
    C typeC commentWLanguage type
    char*read/write ANSI stringsystem integer (containing the address of a fixed Ansi string: &string[ANSI] on <Max Length>)
    wchar*read/write UNICODE stringsystem integer (containing the address of a fixed Unicode string: &string unicode on <Max Length>)
  • Strings in return value
    C typeC commentWLanguage typeWLanguage comment
    char*ANSI stringsystem integeruse StringRetrieve(system integer, srASCIIZAddress)
    wchar*UNICODE stringsystem integeruse StringRetrieve(system integer, srUNICODEAddress)
  • Strings in output parameter
    C typeC commentWLanguage typeWLanguage comment
    char**ANSI stringsystem integeraddress of another system integer containing the address to use with StringRetrieve(system integer, srASCIIZAddress)
    wchar**UNICODE stringsystem integeraddress of another system integer containing the address to use with StringRetrieve(system integer, srUNICODEAddress)

Using arrays of strings

  • Array of strings in input parameter
    C typeC commentWLanguage typeWLanguage comment
    char**array of ANSI stringssystem integer= &array of <N> integerseach array cell must be filled with the address of an Ansi string (&string[ANSI])
    wchar**array of UNICODE stringssystem integer = &array of <N> integerseach array cell must be filled with the address of a Unicode string (Unicode &string)
  • Array of strings in return value
    C typeC commentWLanguage typeWLanguage comment
    char**array of ANSI strings + find out the size <N> elsewheresystem integeryou must use StringRetrieve(system integer, srASCIIZAddress) for each array cell
    wchar**array of UNICODE strings + find out the size <N> elsewheresystem integeryou must use StringRetrieve(system integer, srUNICODEAddress) for each array cell

Strings and structures

  • String directly in a structure
    C typeC commentWLanguage type
    struct ... { char ...[N+1] };read/write ANSI stringStruct is structure
    sString is string on N
    END
    AStruct is Struct
    StructAddress is a system integer=&AStruct
    struct ... { wchar ...[N+1] };read/write UNICODE stringStruct is structure
    sString is UNICODE string on N
    END
    AStruct is Struct
    StructAddress is a system integer=&AStruct
  • Read-only string in input in a structure
    C typeC commentWLanguage type
    struct ... {char* ... };read-only ANSI stringsString is [ANSI] string
    Struct is structure
    aString is int
    END
    AStruct is Struct
    AStruct:aString = &sString
    StructAddress is a system integer=&AStruct
    struct ... {wchar* ... };read-only UNICODE stringsString is UNICODE string
    Struct is structure
    aString is int
    END
    AStruct is Struct
    AStruct:aString = &sString
    StructAddress is a system integer=&AStruct
  • Read/Write string in input in a structure
    C typeC commentWLanguage type
    struct ... {char* ... };read/write ANSI stringsString is [ANSI] string on <Max Length>
    Struct is structure
    aString is a system integer
    END
    AStruct is Struct
    AStruct:aString = &sString
    StructAddress is a system integer=&AStruct
    struct ... {wchar* ... };read/write ANSI stringsString is UNICODE string on <Max Length>
    Struct is structure
    aString is a system integer
    END
    AStruct is Struct
    AStruct:aString = &sString
    StructAddress is a system integer=&AStruct
  • String in output in a structure
    C typeC commentWLanguage typeWLanguage comment
    struct ... {char* ... };ANSI stringStruct is structure
    aString is a system integer
    END
    AStruct is Struct
    StructAddress is a system integer=&AStruct
    + use StringRetrieve (int, srASCIIZAddress)
    struct ... {wchar* ... };UNICODE stringStruct is structure
    aString is a system integer
    END
    AStruct is Struct
    StructAddress is a system integer=&AStruct
    + use StringRetrieve (int, srUNICODEAddress)

Simple array in a structure

  • Simple array directly in a structure
    C typeWLanguage type
    struct ... { type ... [N] };Struct is structure
    t is fixed array of N <corresponding type>
    END
    AStruct is Struct
    StructAddress is a system integer=&AStruct
  • Simple array in a structure
    C typeWLanguage type
    struct ... { type* ... };t is array of N <corresponding type>
    Struct is structure
    aArray is int
    END
    AStruct is Struct
    AStruct:aArray = &t
    StructAddress is a system integer=&AStruct

Class

No conversion is available for the classes.
Minimum version required
  • Version 10
This page is also available for…
Comments
Click [Add] to post a comment