Questions about _MEMs and UDT's - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: Chatting and Socializing (https://qb64phoenix.com/forum/forumdisplay.php?fid=11) +--- Forum: General Discussion (https://qb64phoenix.com/forum/forumdisplay.php?fid=2) +--- Thread: Questions about _MEMs and UDT's (/showthread.php?tid=799) |
Questions about _MEMs and UDT's - justsomeguy - 08-22-2022 Is it possible to pass _MEM handles to Functions/Subs without having to make it global? Is there a way to normalize the behavior of strings in UDT's? Uninitialized strings in UDT's are filled with CHR$(0), and initialized strings are padded with spaces at the end. Trying to determine the actual string length is difficult, because I can't tell if the spaces are intentional or not. Are variable length strings in UDT allowed? I though that they weren't. But it seems if you use the right syntax they are allowed, but I found that I can get some strange behaviors if I use them. (Not demonstrated in code.) I've demonstrated my questions in the following code. Code: (Select All) TYPE tTEST RE: Questions about _MEMs and UDT's - SMcNeill - 08-22-2022 SUB foo (m AS _MEM) <-- can pass mem handles like so. Variable Length strings in UDT are only half supported. The old team was working on them, then quit, and they've been stuck in a half implemented state ever since. |