Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : MMBasic 5.3 wrinkle?
Author | Message | ||||
CaptainBoing Guru Joined: 07/09/2016 Location: United KingdomPosts: 1985 |
This is MMBasic 5.3 on both MZ and MX processor. The NEW command seems to clear variables but does not de-allocate the space. What am I missing? |
||||
Justplayin Guru Joined: 31/01/2014 Location: United StatesPosts: 309 |
I believe you re-allocated memory when you printed the variable a to show it had been cleared. Try using MEMORY immediately after doing a NEW instead. Unfortunately I don't have a 'mite handy to test with at the moment. --Curtis I am not a Mad Scientist... It makes me happy inventing new ways to take over the world!! |
||||
CaptainBoing Guru Joined: 07/09/2016 Location: United KingdomPosts: 1985 |
heh! you passed the test |
||||
WhiteWizzard Guru Joined: 05/04/2013 Location: United KingdomPosts: 2794 |
This is correct! It has thrown me a few times too To see this affect - type a few more PRINT x statements (replacing x with different 'made up' variable names) and then type MEMORY again. You will see the variable count increase for each unique variable you just typed PRINT x for. WW For everything Micromite visit micromite.org Direct Email: whitewizzard@micromite.o |
||||
Print this page |