Is it true that if i access a variable by byref in a function and the variable moves in memory during the function uses it, there may be an memory error and crash ?
so , if byref is the default access for functions and sub , almost every variables have to be static ?
about byref
Re: about byref
Can you provide a specific example of that behavior?
In FreeBASIC, variables whose data can move in memory, such as dynamic arrays or variable length strings, are normally accessible by their descriptors which are at fixed addresses in memory.
In FreeBASIC, variables whose data can move in memory, such as dynamic arrays or variable length strings, are normally accessible by their descriptors which are at fixed addresses in memory.
Re: about byref
i have no specific example , i just experienced some unexpected abend from time to time in my last program "freewebcar_chung" compiled with the v1.05-win32 version of freebasic . i first thought that google maps was sending sometimes corrupted jpg images as it can happen.
then i have tried with earlier freebasic v1.02.1-win32 and the problem seams to have disappeared , well it works until now ... and crashes after some hours ... sorry for the wrong info
then i have tried with earlier freebasic v1.02.1-win32 and the problem seams to have disappeared , well it works until now ... and crashes after some hours ... sorry for the wrong info