# Copyright (c) 2002 Peter Guntert. All rights reserved. ## 7MACROS: savequit - show global variables, save the data, and quit ## ## Usage: savequit ## ## "savequit" is a standard macro primarily designed as an error handler ## for time-consuming calculations. savequit gives first a listing of ## all global variables, then saves the current data set in the file ## (default: savequit.out in the current working directory) ## in real format, and stops the program. ## ## Example: erract := savequit /tmp/prosa.tmp ## (that is, savequit will be executed in case of an error) ## ## See also: erract show if (nparam.eq.0) p1 := savequit.out erract := "print \"*** Error: Output file $p1 cannot be written.\"" write real $p1 quit