Inform - Support - Source

Back to List

Inventory
Complete

Backward
Forward

Plain
Coloured
Gaudy

This code
in plain text

Browsing parserm.h

PrintCommand (lines 2790-2827)

2790  !  PrintCommand reconstructs the command as it presently reads, from
2791  !  the pattern which has been built up
2792  !
2793  !  If from is 0, it starts with the verb: then it goes through the pattern.
2794  !  The other parameter is "emptyf" - a flag: if 0, it goes up to pcount:
2795  !  if 1, it goes up to pcount-1.
2796  !
2797  !  Note that verbs and prepositions are printed out of the dictionary:
2798  !  and that since the dictionary may only preserve the first six characters
2799  !  of a word (in a V3 game), we have to hand-code the longer words needed.
2800  !
2801  !  (Recall that pattern entries are 0 for "multiple object", 1 for "special
2802  !  word", 2 to REPARSE_CODE-1 are object numbers and REPARSE_CODE+n means the
2803  !  preposition n)
2804  ! ----------------------------------------------------------------------------
2805   
2806  [ PrintCommand from i k spacing_flag;
2807   
2808    if (from==0)
2809    {   i=verb_word;
2810        if (LanguageVerb(i) == 0)
2811            if (PrintVerb(i) == 0)
2812                print (address) i;
2813        from++; spacing_flag = true;
2814    }
2815   
2816    for (k=from:k<pcount:k++)
2817    {   i=pattern-->k;
2818        if (i == PATTERN_NULL) continue;
2819        if (spacing_flag) print (char) ' ';
2820        if (i==0) { print (string) THOSET__TX; jump TokenPrinted; }
2821        if (i==1) { print (string) THAT__TX; jump TokenPrinted; }
2822        if (i>=REPARSE_CODE) print (address) No__Dword(i-REPARSE_CODE);
2823        else print (the) i;
2824        .TokenPrinted;
2825        spacing_flag = true;
2826    }
2827  ];


Last updated 27 February 2004. This site is no longer supported; information may be out of date.
Maintained as a historical archive by the Interactive Fiction Technology Foundation. Copyright 1993-2018 IFTF, CC-BY-SA unless otherwise noted.
This page was originally managed by Graham Nelson (graham@gnelson.demon.co.uk) assisted by C Knight.