| Home | Previous Lesson: Parameterized Events Next Lesson: Triggering an Event |
An event can return value from the event script. All event ids that are listed in the "Paste Event ID", i.e., the pre-defined events are defined as Long return value. For these events it is not necessary to code Return statement in the event script, even though the declaration says Long as the return value. If you execute mapped events that have no code, the return value would be a NULL. If the event has script but has no return statement, a 0 is returned. Even if you have comments in the script and have no code, the return value would still be a 0.
However, for an unmapped event, you must return some value with the Return statement, otherwise, you get compilation errors. That is because it has to return some value.
You can't define unmapped events in versions prior to 5.0. That means events have to be mapped to one or other event ids. When you migrate to version 7.0, errors are not generated while executing these events, instead they return 0 if the event has script, and returns NULL if the event has no script.
| Home | Previous Lesson: Parameterized Events Next Lesson: Triggering an Event |