|
| how to get the size of the structurue |
| Iniciado por vvido, 24,jul. 2015 11:06 - 1 respuesta |
| |
| | | |
|
| |
Miembro registrado 94 mensajes |
|
| Publicado el 24,julio 2015 - 11:06 |
I have defined several structures containig several fields. I would like to get the size of each strucutre, but have not found the functions for this.
Length (function) works only with buffers and strings.
I know that the structures have fixed size (by definition) and that their size is known after they are defined. I can sum the sizes of all fields, but to avoid a mistakes, I would expect the compiler to provide me with this information. I need these sizes when creating the data which is sent using sockets.
I am sure that this exists, but as a novice user of WinDev I have not found it (yet). |
| |
| |
| | | |
|
| | |
| |
Miembro registrado 94 mensajes |
|
| Publicado el 24,julio 2015 - 11:18 |
Just a short additional info:
I have defined a strucutre, which contains three fields, total length of 16 (for test purposes).
If I use the following statements
Serialize(stMyStruct,b,psdBinary) Info ("buf len after serialize", Length(b))
I get 189. I have expected to get the net size of the strucutre.
Obviously psdBinary is not what I have assumed from the description in the help. What does psdBinary actually do ? |
| |
| |
| | | |
|
| | | | |
| | |
|