- 4.67.2.25. -
Table of Contents
4. Standard Units
4.67. System - Built-in routines
4.67.2. System Unit Procedures and Functions
4.67.2.25. Exit procedure
4.67.2.25. Exit procedure
Targets: MS-DOS, OS/2, Win32
System Unit
Exits immediately from the current block.
Declaration:
procedure Exit;
While in a procedure or function, Exit causes the subroutine
to return to the parent routine. Exit terminates the program
if called while in the main routine.
Example:
{$ifndef __CON__}
This program must be compiled as console application only
{$endif}
uses
Crt;
procedure ChgColor(ForeGround,BackGround:Byte);
begin
if not IsColor then Exit;
SetColor(ForeGround);
TextBackGround(BackGround);
end;
begin
ChgColor(Green, Black);
WriteLn('Hellow Green World!');
end.
- 4.67.2.25. -