Lines of Communication

version 1 by Aaron Reed

  • Home page
  • Beginning
  • Previous
  • Next



  • Chapter - Merged Inputs

    [Read in lines from the inputs of the passed list of file channels, and combine them all into a single line separated by periods. This will prep the parser to execute all queued commands.]

    To decide what indexed text is the merged inputs from (L - a list of objects):
        let finalCommand be indexed text;
        repeat with chan running through L:
            let incoming commands be indexed text;
            now incoming commands is "[text of the input file of chan]";
            replace the regular expression "\n+" in incoming commands with ". ";
            unless incoming commands is empty:
                unless finalCommand is empty, now finalCommand is "[finalCommand]. ";
                now finalCommand is "[finalCommand][incoming commands]";
            write "" to the input file of chan;
        decide on finalCommand.