REDIM, TYPE, and STRING Woes
#17
(04-12-2023, 11:48 PM)Kernelpanic Wrote: In the present case, the meta command "$Dynamic" should/could help. The $Dynamic metacommand is a compiler switch that causes the compiler to not reserve fixed memory space for arrays during compilation.
The storage space is only requested at runtime; see the thread about static and dynamic arrays.

In QB64 the $Dynamic metacommand doesn't actually do much. Both static and dynamic arrays are allocated at runtime, but static arrays have a flag set on them that prevents
ReDim
from working (it errors instead) and makes a handful of commands work slightly differently. When you use $Dynamic this flag isn't set so arrays created with
Dim
are treated the same as those created with
ReDim
.
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 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)