Next: , Previous: , Up: Top   [Index]


11 Errors

Most aime interfaces (functions, operators, etc) report no error, admit no error. When their logic fails to execute, the programs are terminated with the appropriate error reports displayed (the applications embedding the aime interpreter needs to make the arrangements for the latter to occur).

real x;

x = 3 / 0;

will terminate with the message:

<interpreter name>: <program name>: 3: division by zero

displayed.

file f;

f_open(f, "directory/!?#$%^&*(),707", OPEN_READONLY, 0);

will terminate with:

<interpreter name>: <program name>: 3: cannot open `directory/!?#$%^&*(),707': No such file or directory

when directory/!?#$%^&*(),707 does not exist.

In this largely error free execution paradigm, aime programs are seldomly concerned with errors. It is nonetheless possible to both generate errors when the execution cannot continue and trap errors that would otherwise terminate the program execution.