Quote from: PascalDragon on January 18, 2024, 10:16:01 pmFor some things it is guaranteed, because it's considered part of the language.It may be part of FPC but it is not part of the Pascal language.
For some things it is guaranteed, because it's considered part of the language.
I miss that if you want to allocate initialized data, and getmem is citated above, one should use AllocMem, not GetMem...AllocMem initializes to all zero's, also on the stack, a bit like Default().
Isn't it easier to design execution flow in such way that values assigned naturally with meaningful values before the first time the value is being used anywhere in program. Then there is no guessing or duplicate operations.
Well the rule is pretty simple: Stack, locals: Uninitialized, Heap, global: Initialized.
But that is why a mentioned allocmem. Suppose array allocation. Grr. Sometimes you can not read my replies Sarah.