DPL provides a function called state() that returns the state of an event. It lets you process and test any event's state just as you would use other values. The function has one argument, which must be the name of an event: a chance, decision, or controlled event. If the event is in its first state, the function returns the number 1. If the event is in its second state, the function returns the number 2, and so on. If the state of the event is unknown, DPL will generate an error message. The function does not reference or return the names of the states.
DPL includes the state function primarily so you can pass the states of events to an external function that you write and compile outside DPL (see User Libraries).
Versions: DPL Professional, DPL Enterprise, DPL Portfolio