OnReset Event (AProgram, ADriver, ASystem)

Occurs when the application is reset.

Syntax

Object.OnReset()

The OnReset event syntax has the following parts:

 

Name

Type

Description

Object

AProgram, ADriver, ASystem

Module object

Comments

This event is called when the user select Reset command from the IDE run menu or when a Reset statement is called.

The sequence of OnReset event called is as follows:

  1. Program.OnReset (if a program is currently running)

  2. Driver(i).OnReset

  3. System.OnReset

The following example shows the results of calling the reset statement inside a test:

   * Program.OnInitTest

   * Program.OnReset

   * Driver2.OnReset

   * Driver1.OnReset

   * System.OnReset

   * Program.OnEndTest

If the reset is called by pressing Reset command from the IDE button the application will be aborted exit and reloaded as shown here (no program was loaded in this example):

 

...Application aborted.

   * Driver2.OnAbort

   * Driver1.OnAbort

   * System.OnAbort

   * System.OnEndSystem

   * Driver2.OnEnd

   * Driver1.OnEnd

   * System.OnEnd

...Application reset.

   * Driver2.OnReset

   * Driver1.OnReset

   * System.OnReset

 

********************************************************************************

   * System.OnInit

   * Driver1.OnInit

   * Driver2.OnInit

   * System.OnInitSystem

Example

The following is an example of one way to use the OnRest event:

Program.OnReset()

{

! ... program initialization code ...

print "Program "; Program.Name; " has been re-initialized after application reset."

}

Applies to

AProgram, ADriver, ASystem

See Also

Reset, Reset Events, About Module Events