ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage syntax / 
  • 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/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Converting C types
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 bytes2-byte integer
word, uint162 bytesunsigned integer on 2 bytes
long, int 32, int (in 32 bits)4 bytes[4-byte] integer
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 bytes[8-byte] real

Simple types in output parameter

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

Simple array in return value

C typeC commentWLanguage typeWLanguage comment
char*, int8*4 bytes in 32-bit, 8 bytes in 64-bit + size <N> to getsystem integeraddress of an array of <N> 1-byte integers or address of an [ANSI] string. Use Transfer or StringRetrieve to retrieve the values.
byte*, uint8*4 bytes in 32-bit, 8 bytes in 64-bit + size <N> to getsystem integeraddress of an array of <N> unsigned 1-byte integers or address of a buffer. Use Transfer or StringRetrieve to retrieve the values.
short*, int16*4 bytes in 32-bit, 8 bytes in 64-bit + size <N> to getsystem integeraddress of an array of <N> integers on 2 bytes. Use Transfer to retrieve the values.
word*, uint16*4 bytes in 32-bit, 8 bytes in 64-bit + size <N> to getsystem 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-bit, 8 bytes in 64-bit + size <N> to getsystem integeraddress of an array of <N> integers [on 4 bytes]. Use Transfer to retrieve the values.
dword*, uint32*4 bytes in 32-bit, 8 bytes in 64-bit + size <N> to getsystem integeraddress of an array of <N> unsigned integers on 4 bytes. Use Transfer to retrieve the values.
longlong*, int64*4 bytes in 32-bit, 8 bytes in 64-bit + size <N> to getsystem integeraddress of an array of <N> unsigned integers on 8 bytes. Use Transfer to retrieve the values.
ulonglong*, dwordlong*, uint64*4 bytes in 32-bit, 8 bytes in 64-bit + size <N> to getsystem integeraddress of an array of <N> unsigned integers on 8 bytes. Use Transfer to retrieve the values.
float*4 bytes in 32-bit, 8 bytes in 64-bit + size <N> to getsystem integeraddress of an array of <N> reals on 4 bytes. Use Transfer to retrieve the values.
double*4 bytes in 32-bit, 8 bytes in 64-bit + size <N> to getsystem 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-bit, 8 bytes in 64-bit + size <N> to getsystem integeraddress of another system integer that contains the address of an array of <N> 1-byte integers or an [ANSI] string. Use Transfer or StringRetrieve to retrieve the values.
byte**, uint8**4 bytes in 32-bit, 8 bytes in 64-bit + size <N> to getsystem 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-bit, 8 bytes in 64-bit + csize <N> to getsystem 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-bit, 8 bytes in 64-bit + size <N> to getsystem 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-bit, 8 bytes in 64-bit + size <N> to getsystem integeraddress of another system integer that contains the address of an array of <N> [4-byte] integers + Transfer
dword**, uint32**4 bytes in 32-bit, 8 bytes in 64-bit + size <N> to getsystem 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-bit, 8 bytes in 64-bit + size <N> to getsystem 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-bit, 8 bytes in 64-bit + size <N> to getsystem 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-bit, 8 bytes in 64-bit + size <N> to getsystem 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-bit, 8 bytes in 64-bit + size <N> to getsystem integeraddress of another system integer that contains the address of an array of <N> [8-byte] reals. 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.
See also
Minimum version required
  • Version 10
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/06/2024

Send a report | Local help