Custom Library Messages

version 4/120212 by Ron Newcomb

  • Home page
  • Beginning
  • Previous
  • Next



  • Chapter - so the Printing the Name activity doesn't favor You and yourself - unindexed

    Include (- Global caps_mode = false; -) after "Definitions.i6t". [move this variable to earlier in the I6 source so the "capitalisation mode" variable can be used in many more places]

    The printed name of yourself is usually "[if capitalisation mode is true][We][else][ourselves]".

    Include (-
    [ STANDARD_NAME_PRINTING_R obj;
    obj = parameter_object;
    if (obj == 0) { print (string) NOTHING__TX; return; }
    switch (metaclass(obj)) {
            Routine: print "<routine ", obj, ">"; return;
            String: print "<string ~", (string) obj, "~>"; return;
            nothing: print "<illegal object number ", obj, ">"; return;
    }
    #Ifdef LanguagePrintShortName;
    if (LanguagePrintShortName(obj)) return;
    #Endif; ! LanguagePrintShortName
    if (indef_mode && obj.&short_name_indef ~= 0 && PrintOrRun(obj, short_name_indef, true) ~= 0) return;
    if ( caps_mode && obj.&cap_short_name ~= 0 && PrintOrRun(obj, cap_short_name , true) ~= 0) { caps_mode = false; return; }
    if ( obj.&short_name ~= 0 && PrintOrRun(obj, short_name , true) ~= 0) return;
    print (object) obj;
    ];-) instead of "Standard Name Printing Rule" in "Printing.i6t".