The abort statement immediately stops program execution and unconditionally returns to the TCL command prompt.
abort {message#}{,"parameter"{,"parameter"...}} abort {error.message.str}
message# | Item-ID of the message to output, located in the dm,messages, file. |
parameter | Values required by the message. If the string form is used, the message string displays on the screen and placed in the dm,messages, file. |
The abort statement specifies an abnormal end and can appear anywhere in the program.
The abort statement is similar to the stop statement, except the abort statement also terminates execution of any macro or Proc that might have called the program containing the abort statement and aborts the FlashBASIC or BASIC program.
The abort statement automatically generates the error message:
"[b1] run-time abort at line ’ n’"
If "invoices" cannot be opened, the program aborts with error message 201 and passes in the string "invoices".
open "invoices" to invoice.file else abort 201,"invoices"
This causes the program to stop with the message:
"invoices" is not a file name
In this case, both [b201] and [b1] error messages display.