Exiting from a procedure

www.kxcad.net Home > Electronic Index > Altium(Protel) Index


Your Ad Here

Delphi Script provides Exit and Break statements, should you want you exit from a procedure before the procedure would terminate naturally. For example; if the value of a parameter is not suitable, you might want to issue a warning to the user and exit, as example below shows.

Procedure DisplayName (s);

Begin

    If s = ‘’ Then

    Begin

        ShowMessage(‘Please enter a name’);

        Exit;

    End;

    ShowMessage(S + ‘ is shown’);

End;

See also

Writing Scripts

Your Ad Here