[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Assign_Idle_Hook


Purpose   Identifies a procedure that will be continually called while the
          program is waiting for a key.

Decln.    Assign_Idle_Hook(Proc:Key_Idle_Type);

Remarks   Proc is the assigned procedure which must be declared far and
          must have no passed parameters. Keep the procedure fast and
          efficient to avoid a sluggish keyboard response. If the procedure
          is a background procedure (such as printing), be sure to check
          for KeyPressed, and exit if the user has pressed a key.

Example

    {$F+}
    PROCEDURE KEY_STATUS;
    BEGIN
        IF CAPSON THEN
           WRITEAT(65,25,WHITE,BLUE,'CAPS')
        ELSE
           WRITEAT(65,25,WHITE,BLUE,'   ');
    END;
    {$F-}

BEGIN
    ASSIGN_IDLE_HOOK(KEY_STATUS);
END;

This procedure is only available for Turbo 5.0 programmers. Turbo 4.0
programmers should replace the procedure with the statement:

     KTTT.IDLE_HOOK := @KEY_STATUS;

See Also: Assign_Pressed_Hook
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson