Login
Back to forumSee the full topicGo to last reply

Posted By

Basman
on 2019-04-23
18:48:15
 Re: PRINT statement fills the RAM

I haven't checked yet, but it seems that the FRE function forces garbage collection on temporary strings. If the first string is not moved around in the process, it could be the solution.
The reason why I don't want the first string to be moved is that I use a ML routine for keyboard input, that directly accesses the first string through its descriptor (it assumes that the first variable is a string, so I initialize my string at the beginning of the Basic program). If you LIST the program after use, you'll see the last text that was typed, inside the quote marks.
Another difference between C64 and Plus4 string management is about string variables initialized through assignent to constant. On the C64, if you do a$="foobar", a descriptor will be created which directly points into the program's text; new strings in RAM are only created if they are the result of calculations or INPUT operations. The Plus4 always creates strings in RAM.

Thanks to all who replied.



Back to top


Copyright © Plus/4 World Team, 2001-2024