=====Pseudo-variable side effects===== //by Richard Russell, March 2011//\\ \\ One thing that distinguishes the [[http://www.bbcbasic.co.uk/bbcwin/manual/bbcwin2.html#pseudovars|pseudo-variables]] (**HIMEM**, **LOMEM**, **PAGE**, **PTR#** and **TIME**/**TIME$**) from regular variables is that writing or reading a pseudo-variable may have a //side effect// in addition to what you would expect it to do. So for example a statement like:\\ LOMEM = LOMEM which you might not expect to do anything, actually does have an effect which could be important.\\ \\ The main side effects from accessing the pseudo-variables are listed below:\\ \\ * **HIMEM**: Writing updates the amount of available user memory (overriding the value set in the [[http://www.bbcbasic.co.uk/bbcwin/manual/bbcwin1.html#customize|Customize dialogue]]). Also removes any libraries, if set to a value higher than the address at which they were INSTALLed. \\ * **LOMEM**: Writing performs the same action as [[http://www.bbcbasic.co.uk/bbcwin/manual/bbcwin4.html#clear|CLEAR]], in other words it deletes the contents of the heap. \\ * **PAGE**: Writing prompts for the current program to be saved, if it has been modified. Also refreshes the contents of the [[http://www.bbcbasic.co.uk/bbcwin/manual/bbcwin1.html#editing|editing pane]], so that it displays the program loaded at the new address. \\ * **PTR#**: Writing flushes the file buffers (see [[/Flushing%20file%20buffers|Flushing file buffers]]). \\ * **TIME**: Reading updates an internal variable designed to compensate for the Windows 'tick counter' rolling over after about 50 days of operation. \\ * **TIME$**: Writing updates the system date and/or time (if you have the appropriate privileges).