Purpose The saveprogstate statement is used to save the current state of a program to a file. This file is called a state file. The saveprogstate statement should be placed within the main part of a Superx++ program rather than within methods of a class. The state file is used to resume the execution of the program from the next statement after the saveprogstate statement that created the state file.
Format saveprogstate({file path});

{file path} the path to the state file
Example #1 xout("Hello World!");
xout("\r\nHello Again!");

If you run this program then the two lines shown below will be written to the output stream:
Hello World!
Hello Again!

However, the state file of the program will also be created at the path: C:\MyDir\MyFile.xml which looks like:
      <xout>Hello World!</xout>
      <xout>\r\nHello Again!</xout>
   <date>#24-May-2002 12:30:43#</date>

When this state file is run, the effect will be that the program will resume its execution from the statement succeeding the saveprogstate statement. The result will be that the following text will be sent to the output stream:
Hello Again!