-
Declaration:
- Procedure AssignCrt (Var F: Text);
-
Description:
- AssignCrt Assigns a file F to the console. Everything written to the file F goes to the console
instead. If the console contains a window, everything is written to the window instead.
-
Errors:
- None.
-
See also:
- Window (55)
Listing: crtex/ex1.pp
-
Declaration:
- Procedure CursorBig ;
-
Description:
- Makes the cursor a big rectangle. Not implemented on LINUX.
-
Errors:
- None.
-
See also:
- CursorOn (45), CursorOff (45)
-
Declaration:
- Procedure ClrEol ;
-
Description:
- ClrEol clears the current line, starting from the cursor position, to the end of the window.
The cursor doesn’t move
-
Errors:
- None.
-
See also:
- DelLine (46), InsLine (48), ClrScr (44)
Listing: crtex/ex9.pp
-
Declaration:
- Procedure ClrScr ;
-
Description:
- ClrScr clears the current window (using the current colors), and sets the cursor in the top
left corner of the current window.
-
Errors:
- None.
-
See also:
- Window (55)
Listing: crtex/ex8.pp
-
Declaration:
- Procedure CursorOff ;
-
Description:
- Switches the cursor off (i.e. the cursor is no longer visible). Not implemented on LINUX.
-
Errors:
- None.
-
See also:
- CursorOn (45), CursorBig (43)
-
Declaration:
- Procedure CursorOn ;
-
Description:
- Switches the cursor on. Not implemented on LINUX.
-
Errors:
- None.
-
See also:
- CursorBig (43), CursorOff (45)
-
Declaration:
- Procedure Delay (DTime: Word);
-
Description:
- Delay waits a specified number of milliseconds. The number of specified seconds is an
approximation, and may be off a lot, if system load is high.
-
Errors:
- None
-
See also:
- Sound (52), NoSound (50)
Listing: crtex/ex15.pp
-
Declaration:
- Procedure DelLine ;
-
Description:
- DelLine removes the current line. Lines following the current line are scrolled 1 line up, and
an empty line is inserted at the bottom of the current window. The cursor doesn’t move.
-
Errors:
- None.
-
See also:
- ClrEol (44), InsLine (48), ClrScr (44)
Listing: crtex/ex11.pp
-
Declaration:
- Procedure GotoXY (X: Byte; Y: Byte);
-
Description:
- Positions the cursor at (X,Y), X in horizontal, Y in vertical direction relative to the origin
of the current window. The origin is located at (1,1), the upper-left corner of the window.
-
Errors:
- None.
-
See also:
- WhereX (54), WhereY (54), Window (55)
Listing: crtex/ex6.pp
-
Declaration:
- Procedure HighVideo ;
-
Description:
- HighVideo switches the output to highlighted text. (It sets the high intensity bit of the
video attribute)
-
Errors:
- None.
-
See also:
- TextColor (53), TextBackground (52), LowVideo (50), NormVideo (50)
Listing: crtex/ex14.pp
-
Declaration:
- Procedure InsLine ;
-
Description:
- InsLine inserts an empty line at the current cursor position. Lines following the current
line are scrolled 1 line down, causing the last line to disappear from the window. The cursor
doesn’t move.
-
Errors:
- None.
-
See also:
- ClrEol (44), DelLine (46), ClrScr (44)
Listing: crtex/ex10.pp
-
Declaration:
- Function KeyPressed : Boolean;
-
Description:
- The Keypressed function scans the keyboard buffer and sees if a key has been pressed. If
this is the case, True is returned. If not, False is returned. The Shift, Alt, Ctrl keys are
not reported. The key is not removed from the buffer, and can hence still be read after the
KeyPressed function has been called.
-
Errors:
- None.
-
See also:
- ReadKey (51)
Listing: crtex/ex2.pp
-
Declaration:
- Procedure LowVideo ;
-
Description:
- LowVideo switches the output to non-highlighted text. (It clears the high intensity bit of
the video attribute)
-
Errors:
- None.
-
See also:
- TextColor (53), TextBackground (52), HighVideo (48), NormVideo (50)
For an example, see HighVideo (48)
-
Declaration:
- Procedure NormVideo ;
-
Description:
- NormVideo switches the output to the defaults, read at startup. (The defaults are read
from the cursor position at startup)
-
Errors:
- None.
-
See also:
- TextColor (53), TextBackground (52), LowVideo (50), HighVideo (48)
For an example, see HighVideo (48)
-
Declaration:
- Procedure NoSound ;
-
Description:
-
Stops the speaker sound. This call is not supported on all operating systems.
-
Errors:
- None.
-
See also:
- Sound (52)
Listing: crtex/ex16.pp
-
Declaration:
- Function ReadKey : Char;
-
Description:
-
The ReadKey function reads 1 key from the keyboard buffer, and returns this. If an extended
or function key has been pressed, then the zero ASCII code is returned. You can then read the
scan code of the key with a second ReadKey call. Remark. Key mappings under Linux can
cause the wrong key to be reported by ReadKey, so caution is needed when using ReadKey.
-
Errors:
- None.
-
See also:
- KeyPressed (49)
Listing: crtex/ex3.pp
-
Declaration:
- Procedure Sound (hz : word);
-
Description:
- Sounds the speaker at a frequency of hz. Under WINDOWS, a system sound is played and
the frequency parameter is ignored. On other operating systems, this routine may not be
implemented.
-
Errors:
- None.
-
See also:
- NoSound (50)
-
Declaration:
- Procedure TextBackground (CL: Byte);
-
Description:
-
TextBackground sets the background color to CL. CL can be one of the predefined color
constants.
-
Errors:
- None.
-
See also:
- TextColor (53), HighVideo (48), LowVideo (50), NormVideo (50)
Listing: crtex/ex13.pp
-
Declaration:
- Procedure TextColor (CL: Byte);
-
Description:
-
TextColor sets the foreground color to CL. CL can be one of the predefined color constants.
-
Errors:
- None.
-
See also:
- TextBackground (52), HighVideo (48), LowVideo (50), NormVideo (50)
Listing: crtex/ex12.pp
-
Declaration:
- procedure TextMode(Mode: Integer);
-
Description:
- TextMode sets the textmode of the screen (i.e. the number of lines and columns of the
screen). The lower byte is use to set the VGA text mode.
This procedure is only implemented on DOS.
-
Errors:
- None.
-
See also:
- Window (55)
-
Declaration:
- Function WhereX : Byte;
-
Description:
-
WhereX returns the current X-coordinate of the cursor, relative to the current window. The
origin is (1,1), in the upper-left corner of the window.
-
Errors:
- None.
-
See also:
- GotoXY (47), WhereY (54), Window (55)
Listing: crtex/ex7.pp
-
Declaration:
- Function WhereY : Byte;
-
Description:
-
WhereY returns the current Y-coordinate of the cursor, relative to the current window. The
origin is (1,1), in the upper-left corner of the window.
-
Errors:
- None.
-
See also:
- GotoXY (47), WhereX (54), Window (55)
Listing: crtex/ex7.pp
-
Declaration:
- Procedure Window (X1, Y1, X2, Y2: Byte);
-
Description:
- Window creates a window on the screen, to which output will be sent. (X1,Y1) are the
coordinates of the upper left corner of the window, (X2,Y2) are the coordinates of the bottom
right corner of the window. These coordinates are relative to the entire screen, with the top
left corner equal to (1,1) Further coordinate operations, except for the next Window call,
are relative to the window’s top left corner.
-
Errors:
- None.
-
See also:
- GotoXY (47), WhereX (54), WhereY (54), ClrScr (44)
Listing: crtex/ex5.pp