Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
APIs from QB64PE and parameters defined As Any and unions of types ?
#7
(05-31-2024, 01:16 PM)Kernelpanic Wrote: An example of how unions and structures are used, and how much memory is used.

To explain again: In a union, the memory requirement is equal to the largest variable.
All variables in a union have to share this memory, so one have to know exactly which one one want to use.
In a structure, each variable gets its own memory space.

Thank you for explaining. 
I'm planning to give Spriggsy's _MEMGET handler a try, which allocates memory depending on type.
Reply


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

Possibly Related Threads…
Thread Author Replies Views Last Post
  need help playing sound using certain parameters madscijr 0 389 04-01-2025, 03:52 PM
Last Post: madscijr
  Does _MapTriangle work in a user defined Window? bplus 12 2,214 02-16-2024, 01:40 AM
Last Post: bplus
Question Last 2 parameters of Locate bplus 5 1,058 01-20-2024, 08:47 PM
Last Post: TerryRitchie
  Arrays In User Data Types Consolemu 2 864 01-18-2024, 09:49 PM
Last Post: bplus
  Why aren't these subroutines working on user defined types? James D Jarvis 4 1,089 11-12-2023, 05:41 AM
Last Post: eoredson

Forum Jump:


Users browsing this thread: 1 Guest(s)