Custom Library Messages

version 4/120212 by Ron Newcomb

  • Home page
  • Beginning
  • Previous
  • Next



  • Section - The Printing Library Message Activity

    The default messages table is a table name that varies. The default messages table is usually the table of custom library messages. [ This allows whole reams of messages to be swapped out at once. ]

    Printing library message something is an activity on numbers [while <action>ing].

    For printing library message (this is the standard library message rule):
        choose the library message corresponding to the library message action # library message number;
        if the chosen row is zero, make no decision;
        say the library-message-text entry;
        library line break if applicable.

    To decide if misc messaging: (- (action == (+ the miscellaneous non-action +)) -).
    To decide which action name is the miscellaneous non-action: (- TABLE_NOVALUE -).

    The action in progress is an action name that varies. The action in progress variable translates into I6 as "action". [ Not used by this extension, but might be handy within the activity. ]
    To decide if there is a library message corresponding to (act - an action name) #/number (n - number): (- (CorrespondingLM({act}, {n}) > 0) -).
    To decide if there is a library message corresponding to (act - an action name) #/number (n - number) in/from (tab - a table name): (- (CorrespondingLM({act}, {n}, {tab}) > 0) -).
    To decide if there is no library message corresponding to (act - an action name) #/number (n - number): (- (CorrespondingLM({act}, {n}) == 0) -).
    To decide if there is no library message corresponding to (act - an action name) #/number (n - number) in/from (tab - a table name): (- (CorrespondingLM({act}, {n}, {tab}) == 0) -).
    To decide what number is the library message corresponding to (act - an action name) #/number (n - number): (- CorrespondingLM({act}, {n}) -).
    To decide what number is the library message corresponding to (act - an action name) #/number (n - number) in/from (tab - a table name): (- CorrespondingLM({act}, {n}, {tab}) -).
    To choose the/-- library message corresponding to (act - an action name) #/number (n - number): (- {-require-ctvs} ct_0 = (+ default messages table +); ct_1 = CorrespondingLM({act}, {n}); -).
    To choose the/-- library message corresponding to (act - an action name) #/number (n - number) in/from (tab - a table name): (- {-require-ctvs} ct_0 = {tab}; ct_1 = CorrespondingLM({act}, {n}, {tab}); -).
    To decide what number is the chosen row: (- ct_1 -).

    To library line break if applicable:
        if the library message number is less than 100:
            if the library message number is at least 1, say line break;
            otherwise now the library message number is zero minus the library message number.

    Include (-
    [ CorrespondingLM act num tab row;
        if (tab == 0) tab = (+ the default messages table +);
        for (row = TableRows(tab) : row >= 1 : row-- )
            if ( (act == (tab-->1)-->(row+COL_HSIZE)) && (num == TableLookUpEntry(tab,2,row)) )
                break; ! I6 actions ##Miscellany & ##ListMiscellany were changed to a table's BLANK value, so this code compares two things without regarding BLANK as a special circumstance.
        return row; ! returns zero if not found
    ];-) instead of "Long Texts" in "Language.i6t". [ saves 10K ]