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


Purpose   Identifies the procedure that will be called when a user selects
          a menu topic.

Decln.    Assign_Despatcher(D:Despatcher_proc);

Remarks   D is the name of the procedure that will be executed when a user
          selects a menu topic. The procedure must be declared far with two
          passed parameters; a variable integer indicating the selected
          topic and a variable byte indicating the refresh code. The
          selected topic code is the code that was passed with the
          Add_Topic procedure.

Example

    {$F+}
    PROCEDURE TASK_MASTER(VAR CODE:INTEGER;VAR R:BYTE);
    BEGIN
        CASE CODE OF
        ....
        301 : BEGIN
                  RESET_PRINTER;
                  R := CLEARCURRENT;
              END;
        ....
        END; {CASE}
    END; {PROC}
    {$F-}

BEGIN
    ASSIGN_DESPATCHER(TASK_MASTER);
END;

The despatcher procedure Task_Master checks to see if the user selected the
topic with a code of 301. If so, the printer is reset, and control is
passed back to the nested menu, but the menu is removed and the parent menu
displayed.

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