AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Sintaxis WLanguage / Tipos de WLanguage
  • 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
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
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 byte1-byte unsigned integer
short, int162 bytes2-byte integer
word, uint162 bytes2-byte unsigned integer
long, int 32, int (in 32 bits)4 bytes[4-byte] integer
dword, uint324 bytes4-byte unsigned integer
longlong, int648 bytes8-byte integer
ulonglong, dwordlong, uint648 bytes8-byte unsigned integer
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> 1-byte unsigned 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: &amp;string[ANSI])
    wchar*read Unicode stringsystem integer (containing the address of a Unicode string: &amp;unicode string)
  • Read/Write strings in input parameter
    C typeC commentWLanguage type
    char*read/write ANSI stringsystem integer (containing the address of a fixed Ansi string: &amp;string[ANSI] on <Longueur Max>)
    wchar*write Unicode stringsystem integer (containing the address of a fixed Unicode string: &amp;unicode string on <Longueur Max>)
  • 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 + know <N> size 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 of 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 of 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 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 of <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 of <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.
Ver también
Versión mínima requerida
  • Versión 10
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 30/09/2024

Señalar un error o enviar una sugerencia | Ayuda local