String Buffers

version 5 by Jesse McGrew

  • Home page
  • Beginning
  • Previous
  • Next



  • Chapter 2 - Hook Phrases (I7/I6)

    The start of quoted text and the end of quoted text are numbers that vary.

    To decide which number is length of the quoted text:
        [BUGFIX: we need to use a temporary variable for the "decide on" to generate correct code]
        let X be the end of quoted text minus the start of quoted text;
        decide on X;

    To decide which number is message length of (x - a buffered thing):
        (- (BufferedMsgLength({x})) -)

    To say message of (x - a buffered thing):
        (- PrintBufferedMsg({x}, ""); -)

    To say message of (x - a buffered thing) or (alternate - text):
        (- PrintBufferedMsg({x}, {alternate}); -)

    To decide which number is total string buffer space:
        (- (STRING_BUFFER_SIZE) -)

    To treat (S - snippet) as quoted text:
        (- SnippetToQuotedTextTemp({S}); -)

    To copy the quoted text to (x - a buffered thing):
        (- QuotedTextTempToBuffer({x}); -)

    To erase the message of (x - a buffered thing):
        (- EraseBufferedMsg({x}); -)

    To change the message of (x - a buffered thing) to (message - text):
        (- SetBufferedMsg({x}, {message}); -)

    [XXX]
    To append (message - text) to the message of (x - a buffered thing):
        (- CatBufferedMsg({x}, {message}); -)

    [XXX]
    To append (n - number) to the message of (x - a buffered thing):
        (- NCatBufferedMsg({x}, {n}); -)

    [XXX]
    To append char (c - number) to the message of (x - a buffered thing):
        (- ChCatBufferedMsg({x}, {c}); -)

    To change the message of (x - a buffered thing) to upper case:
        (- UCaseBuffer({x}); -)

    To change the message of (x - a buffered thing) to lower case:
        (- LCaseBuffer({x}); -)

    To change the message of (x - a buffered thing) to title case:
        (- TCaseBuffer({x}); -)

    To change the message of (x - a buffered thing) to sentence case:
        (- SCaseBuffer({x}); -)

    To copy the message of (x - a buffered thing) to (y - a buffered thing):
        (- CopyBufferedMsg({x}, {y}); -)

    To decide whether (x - a buffered thing) has the same message as (y - a buffered thing):
        (- (SameMsg({x},{y})) -)

    To decide whether the message of (x - a buffered thing) is (message - text):
        (- (CheckBufferedMsg({x}, {message})) -)

    To capitalize words in the message of (x - a buffered thing) using (t - a table-name):
        (- CapMsgWords({x},{t}); -)