User Tools

Site Tools


Pseudo-variable side effects

by Richard Russell, March 2011

One thing that distinguishes the 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 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 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 editing pane, so that it displays the program loaded at the new address.

  • 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).
This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information
pseudo-variable_20side_20effects.txt · Last modified: 2018/04/17 19:18 by tbest3112