REDIM, TYPE, and STRING Woes
#4
(04-12-2023, 10:24 AM)mnrvovrfc Wrote: It's interesting to notice that QBasic flagged an error when an attempt was made to create an UDT field which was variable-length string. The compiler needed to know what was the size of the UDT. This is everywhere, otherwise must use an interpreter able to trick itself and to "be taught". Need to use _MEM in this case and do the string management yourself.

Yes, having fixed-length strings makes sense once I figured out what was going on. I never ran into this during the QuickBasic days so I had no idea fixed-length only allowed in UDTs when using REDIM. The QB64 compiler should warn of this like the QuickBasic compiler did as you point out.
Software and cathedrals are much the same — first we build them, then we pray.
QB64 Tutorial
Reply


Messages In This Thread
REDIM, TYPE, and STRING Woes - by TerryRitchie - 04-12-2023, 05:57 AM
RE: REDIM, TYPE, and STRING Woes - by mnrvovrfc - 04-12-2023, 10:24 AM
RE: REDIM, TYPE, and STRING Woes - by TerryRitchie - 04-12-2023, 03:56 PM
RE: REDIM, TYPE, and STRING Woes - by bplus - 04-12-2023, 03:50 PM
RE: REDIM, TYPE, and STRING Woes - by mnrvovrfc - 04-12-2023, 04:34 PM
RE: REDIM, TYPE, and STRING Woes - by DSMan195276 - 04-12-2023, 04:15 PM
RE: REDIM, TYPE, and STRING Woes - by mnrvovrfc - 04-12-2023, 04:33 PM
RE: REDIM, TYPE, and STRING Woes - by bplus - 04-12-2023, 04:41 PM
RE: REDIM, TYPE, and STRING Woes - by bplus - 04-12-2023, 05:59 PM
RE: REDIM, TYPE, and STRING Woes - by bplus - 04-12-2023, 06:09 PM
RE: REDIM, TYPE, and STRING Woes - by DSMan195276 - 04-12-2023, 10:14 PM
RE: REDIM, TYPE, and STRING Woes - by SMcNeill - 04-12-2023, 10:20 PM
RE: REDIM, TYPE, and STRING Woes - by DSMan195276 - 04-12-2023, 10:33 PM
RE: REDIM, TYPE, and STRING Woes - by Kernelpanic - 04-12-2023, 11:48 PM
RE: REDIM, TYPE, and STRING Woes - by DSMan195276 - 04-13-2023, 05:17 AM



Users browsing this thread: 2 Guest(s)