![]() |
SAVE inside SUB freezes the program (*solved*) - Printable Version +- Forum (https://www.boriel.com/forum) +-- Forum: Compilers and Computer Languages (https://www.boriel.com/forum/forumdisplay.php?fid=12) +--- Forum: ZX Basic Compiler (https://www.boriel.com/forum/forumdisplay.php?fid=11) +---- Forum: Bug Reports (https://www.boriel.com/forum/forumdisplay.php?fid=15) +---- Thread: SAVE inside SUB freezes the program (*solved*) (/showthread.php?tid=638) |
SAVE inside SUB freezes the program (*solved*) - juanjo - 01-13-2015 I'm making a program to print customized labels with the ZX Printer. I was going to make load/save of label data. The problem is when using SAVE in any of its variants inside a SUB. It freezes after saving is done, and the saved data is different from when the SAVE is done in the 'main block'. The LOAD command does work inside a SUB. I don't know if it has some relation to the previous bug report about SAVE: <!-- l --><a class="postlink-local" href="http://www.boriel.com/forum/bug-reports/save-bug-solved-t858.html">bug-reports/save-bug-solved-t858.html</a><!-- l --> Here is a little program that reproduces the error: Code: dim variableToSave as uinteger Re: SAVE inside SUB freezes the program - boriel - 07-11-2015 Sorry for the delay. But I was a bit busy these last month. Which version are you using? Anyway latest version *crashed* the compiler, so will have a deeper look into it... :? Re: SAVE inside SUB freezes the program - boriel - 07-12-2015 Ok. It was a bug with the SAVE routine, and I think I've fixed it. Please, can you download version ZX Basic 1.4.0-s1918 and test it. Note: I'm also checking for the LOAD routine, as it might contain the same bug. Update: LOAD does not suffer from this bug. ![]() Re: SAVE inside SUB freezes the program - juanjo - 07-13-2015 Thank you for debugging it. I've tested the sample program and it doesn't freeze anymore ![]() Im sorry but I don't have now the time to make more thorough tests. The labels program was finished without the save feature. Also, I don't have anymore an emulator with save capabilities (was using ZXSpin on Wine, but can't use Wine anymore) Greetings Re: SAVE inside SUB freezes the program - boriel - 07-13-2015 juanjo Wrote:Thank you for debugging it.Thanks! My favourite was EmuZWin (now abandoned). By far the best. A pitty ![]() |