decorative banner

Previous | Next               Table Of Contents > 1 Basic syntax > 1.8 Error checking

1.8 Error checking


The ftpresult, mailresult, and fileresult predefined status flags can be used to determine the result of the last executed command. The flags will be set to success if the command completed successfully. Errors may be reported by setting a program exit code, printing an error message, writing out an error file, or even sending out an email message.

Some examples are

ftpconnect "127.0.0.1", 21, "anon", "anon@anon.com";
if ftpresult eq success begin
end else begin
end



mailcreate "My name", "me@mydomain.com", "Test mail", "This is a test mail";
if mailresult eq success begin
end else begin
end



fileopen read, "myfile.txt";
if fileresult eq success begin
end else begin
end


Previous | Next