The ZPrevious command (and menu option) restore the window variables Xmin, Xmax, Xscl, Ymin, Ymax, and Yscl to the values they had before the last Zoom command. This means, of course, that using ZPrevious a second time will cancel its effects.
Since no variables that are specific to the current graphing mode are changed, ZPrevious doesn't always achieve the effect of reversing the previous zoom command. For example, in Polar graphing mode, ZStandard will set θmin and θmax to 0 and 2π respectively. However, even if they were different before ZStandard, ZPrevious will not restore these settings. Also, ZPrevious doesn't notice if you change the window settings directly (by storing to the window variables).
Using StoreGDB and RecallGDB is an excellent way to back up graph settings so a program doesn't modify them. However, if all you're doing is changing the window variables with one Zoom command, you can simply use ZPrevious at the end of the program instead.
- ERR:INVALID occurs if this command is used outside a program (but not if the menu option is used, of course).