Inform - Support - Source

Back to List

Inventory
Complete

Backward
Forward

Plain
Coloured
Gaudy

This code
in plain text

Browsing infix.h

InfixMatchPrule (lines 62-107)

0062  [ InfixMatchPrule PrintingRule range1 range2 wa wl t i i2 it2 itlc j k plus;
0063    itlc = infix_tolowercase;
0064    if (itlc->255 == 0)
0065    {   for (j=0:j<256:j++) itlc->j = j;
0066        itlc->'A' = 'a';      itlc->'B' = 'b';
0067        itlc->'C' = 'c';      itlc->'D' = 'd';
0068        itlc->'E' = 'e';      itlc->'F' = 'f';
0069        itlc->'G' = 'g';      itlc->'H' = 'h';
0070        itlc->'I' = 'i';      itlc->'J' = 'j';
0071        itlc->'K' = 'k';      itlc->'L' = 'l';
0072        itlc->'M' = 'm';      itlc->'N' = 'n';
0073        itlc->'O' = 'o';      itlc->'P' = 'p';
0074        itlc->'Q' = 'q';      itlc->'R' = 'r';
0075        itlc->'S' = 's';      itlc->'T' = 't';
0076        itlc->'U' = 'u';      itlc->'V' = 'v';
0077        itlc->'W' = 'w';      itlc->'X' = 'x';
0078        itlc->'Y' = 'y';      itlc->'Z' = 'z';
0079    }
0080    switch(PrintingRule)
0081    {   InfixPrintAttribute:
0082            if (wa->0 == '~') { wl--; wa++; plus = 100; } ! A tilde
0083            t = #attribute_names_array;
0084        InfixPrintProperty: t = #property_names_array;
0085        InfixPrintAction: t = #action_names_array;
0086        InfixPrintFakeAction: t = #fake_action_names_array;
0087        InfixPrintGlobal: t = #global_names_array;
0088        InfixPrintRoutine: t = #routine_names_array;
0089        InfixPrintAction: t = #constant_names_array;
0090        InfixPrintArray: t = #array_names_array;
0091    }
0092   
0093    i2 = range2-range1; it2 = infix_text+2;
0094    for (i=0: i<=i2: i++)
0095    {   infix_text-->0 = 62; @output_stream 3 infix_text;
0096        if (t) print (string) t-->i; else PrintingRule(i+range1);
0097        @output_stream -3;
0098        k = infix_text-->0;
0099        if (k ~= wl) jump XL;
0100        if (itlc->(it2->0) ~= wa->0) jump XL;
0101        for (j=1:j<k:j++)
0102            if (itlc->(it2->j) ~= wa->j) jump XL;
0103        parsed_number = i + range1 + plus; rtrue;
0104       .XL;
0105    }
0106    rfalse;
0107  ];


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.