Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
APIs from QB64PE and parameters defined As Any and unions of types ?
#2
A "union{}" is a mixed type in C. It is comparable to a *)"struct{}" in C with the difference that all variables share the same memory space; the memory space is determined by the compiler based on the longest variable.
*)A C-struct{} is comparable to Type ... End Type in Basic.

Code: (Select All)

union beispiel
{
  float preis;
  int anzahl;
} beispiel_fuer_zwei;

The "As Any" command in Visual Basic is used to remove the parameter type check when passing parameters. Simply put, it is a hint to the programmer that there is a type difference.

Code: (Select All)

Declare Function xyz ( . . .ByVal lpString As Any) As Integer
Reply


Messages In This Thread
RE: APIs from QB64PE and parameters defined As Any and unions of types ? - by Kernelpanic - 05-30-2024, 09:02 PM



Users browsing this thread: 10 Guest(s)