14-Mar-81 4(704)-2. Fixed Parse with command arguments, fixed echo status initialization. 9-Mar-81 4(703)-2. Fixed reparse of command arguments, changed command confirmation logic to ensure commands do not interfere with each other, fixed DoCommand of multiple-line commands, added variables $PromptEnb and $PromptEnbSub. 6-Mar-81 4(702)-2. Changed $File variables to allow longer filenames, made $PromptReg and $PromptSub return original prompt strings if appropriate, fixed PTY handler to save a register, fixed Prompt to save a variable so DoCommand works afterward. 28-Feb-81 4(701)-2. Added Prompt statement, added PassOutput option to Invoke, fixed synonym definition to convert underscores to hyphens, new symbol replacement algorithm. 17-Jan-81 4(676)-2. Changed fork-handling code to prevent a possible hang due to a race in PTY handling, extended quoted-string buffer to 512 characters, fixed read/write variables like $PromptReg to return value correctly. Added optional third argument to $ReadBinary to provide non-default timeout. 10-Jan-81 4(675)-2. Fixed KillProgram to close the PTY, fixed Save/Exec to save more defaults, added newline to confirmation of Save/Exec, fixed Typein of non-invoked forks not to kill the fork afterward, fixed Invoke to kill previously invoked forks; fixed execution cleanup to clear JFN stack. Added $Append mode to $Open. 23-Dec-80 4(674)-2. Changed all routines to use Exec register conventions, fixed ^C handling to restore COMND state block correctly, fixed Parse (Wild,Parseonly). Added variable $Typeahead_Count to return the number of characters typed into the terminal, added options Invisible and Deleted to Parse File/FileList. 20-Dec-80 4(673)-2. Fixed some error messages, fixed ^T during execution, increased size of compiler constant work area. Added procedure $Wait which delays a given number of milliseconds, added variables $Input and $Output for use as the second argument to $Open. Much more work done in preserved commands created by Save/Exec; better mechanism used to redefine initialization in saved Exec; made Save/Exec correctly save some non-PCL variables 9-Dec-80 4(672)-2. Assorted fixes to Save/Exec. Changed Typein to work if no program has been Invoked (it takes control of the current user program fork), added Save option to Exit statement to prevent the default reset of the Invoked program, added ToProgram option to Exit statement to, in effect, exit the PCL execution and then do a Continue command to continue the Invoked program (this will work pleasantly for only a few programs, in particular only for those which were not performing terminal I/O at the time). Changed Declare to allow redefinition of routines of different classes, fixed Set Variable to case-fold the variable name correctly, fixed Information PCL of Undeclare Original's. Reworked $LastError, $ConnectedDirectory, $FileL, $FileN, and $FileS to dynamically allocate string space (fixed certain problems found through $Search). Added Information Default Declare. 6-Dec-80 4(671)-2. Fixed ^T to properly track switch between PCL execution and DoCommand execution; added string functions $File_Dev, $File_Dir, $File_Nam, $File_Typ which take a file argument like $File_Info_S but return only the corresponding part of the name. Fixed Save/Exec again to handle running out of quota. 1-Dec-80 4(670)-2. Fixed Undeclare All to reset global symbol table, fixed Save/Exec to handle running out of quota. 29-Nov-80 4(667)-2. Added Save/Exec switch to save entire Execs for customization by local installations; change required incompatible change to existing environment files. Fixed Default_Gen to generate correct default version number, fixed Parse Wild to release JFN on exit, fixed $PromptReg to take effect immediately, fixed problem with Take/PCL interaction. 15-Nov-80 4(665)-2. Program control is now done through the PDS interface instead of through a PTY. Fixed various problems brought about by running out of memory during DoCommand To and program control, fixed variables in environment files, fixed command line clearing after failed command argument, fixed nested commands not to interfere with each other's command buffers. Changed Information PCL to give more details for synonyms. 31-Oct-80 4(664)-2. Reworked runtime I/O to use multiple channels, redefined arguments to $FileInfo; see PCL.DOC for details. Added variable $Account, fixed DoCommand to properly terminate command buffer, changed Information Variable not to type initial space. 26-Oct-80 4(663)-2. Fixed Take of PCL commands in the export version, fixed typed procedure calls. Changed Invoke to keep a separate fork handle for each command context, so PCL should not interfere with user forks which existed before the command was started. Fixed Parse (Wild, Parseonly), fixed error message for bad identifier declarations. 21-Oct-80 4(662)-2. Removed take-file facility (to be replaced in time with Take/Batch-compatible), fixed abbreviation definition to relocate command tables correctly, fixed text area initialization so Undeclare All works. Changed environment file version number to allow environment files to save global variable contents. Added $FileInfo_I and $FileInfo_S procedures, see PCL.DOC. 18-Oct-80 4(661)-2. Lengthened stack to reduce overflow problems, fixed $SearchRaised to count correctly, fixed Information PCL line overflow. Added FileList field-type; see PCL.DOC for details. 11-Oct-80 4(660)-2. Changed Invoke not to reset existing user forks, fixed error in substring extraction, changed Information PCL to respect terminal width. Added ability to define synonyms and to remove original commands in .PCL files, with lines like "SYNONYM S SYSTAT" and "NOORIGINAL PLOT". Installed preliminary changes to allow implementation of Parse List. 3-Oct-80 4(657)-2. Fixed Info Variable of empty string variable, made stack larger, changed Declare of variables to only declare one at a time, and not to work until carriage return is pressed. Corrected code to manipulate command keyword table to properly handle abbreviations. Added /NoConfirm to Undeclare, changed Undeclare to start working only after carriage return. Fixed Parse to allow stray semicolon at end, and to have the short form of Parse tolerate an Else after it. Added Undeclare All, which should reset everything possible which relates to PCL. Added NoIndirect field-option to Parse to indicate that atsigns should not cause indirect file reference (sets CM%XIF); added NoHelp field-option which sets CM%SDH (useful when you want absolutely no help). Added string variables $PromptReg and $PromptSub which can be written to change the standard prompt strings for regular commands and subcommands (which are @ and @@ initially). 24-Sep-80 4(656)-2. Fixed ^T after completion of a PCL command, changed redefinition code to allow new commands to replace synonyms, expanded all storage areas used by PCL, removed fudge to fork handling required by error in SCTTY JSYS, fixed problem with failing to parse the first COMMAND in a PCL file, fixed "LET STRVAL=$VALUE" to give correct error. Added input/output service routines; see PCL.DOC for details. 16-Sep-80 4(655)-2. Fixed routine replacement ("old version superceded"), Fixed Typein to send final carriage return, changed compilation of CALL statement to tag instructions with line number of CALL, implemented two- character relationals ( <= for GEQ, >= for LEQ, <> for NEQ), better confirmation for Save/Environment command, fixed prompting after nested PCL commands. 11-Sep-80 4(654)-2. Fixed program control to ensure that program fork is stopped when user ^C's or Exits out of PCL, reworked parsing of arguments to Save command, adjusted global symbol allocation so command name manipulations (synonym, undeclare original) can work properly from environment files. Fixed Undeclare command to handle multiple variable names, changed format of Information PCL command as planned, fixed bugs introduced into Take-file handling due to the implementation of DoCommand To. Fixed bug in PTY/PDS handling which caused Exec to hang if the program typed out too much too fast; changed Typein to remove all line feeds from the string to be typed into the program (carriage returns are sufficient). All program control at CMU is now done through the new PDS device, instead of through a PTY; this allows many more people to use PCL at the same time, since PTY's are an exhaustible resource and PDS's are inexhaustible on a system-wide level. You can now declare global variables from PCL source files: Along with Command and Procedure definitions, you can make an Integer or String definition, consisting merely of the keyword Integer or String followed by the name of the variable, which will then be defined the same as if you had done a Declare Integer-variable (or String-variable) command from the terminal. The LET statement keyword is now optional, and will ultimately be removed. Now, the statements LET I=J+3 and I=J+3 are equivalent. Also, parenthesized arithmetic expressions are now implemented. 7-Sep-80 4(653)-2. Changed PCL space allocator to issue error at correct time, fixed Declare Environment not to cause space fragmentation, fixed Parseonly of File fields, fixed substring extraction length designation of *, fixed "Substring start less than 0" message, fixed error in integer arithmetic code generation, fixed DoCommand To followed by ordinary DoCommand. Changed Words field-option to allow numbers as keywords, changed Parse to prohibit chaining Noise field-types along with other types, changed error handling to report attempts to declare variables after the first executable statement. Fixed Declare to raise variable names to upper case, and Undeclare to only convert underscores to hyphens for Commands. Added system procedure $SearchRaised, which is the same as $Search except that it raises alphabetic characters to upper case; added optional third argument to $Search and $SearchRaised, to specify where in the string to begin the search. Changed code to report missing labels to give the name of the label. 20-Aug-80 4(652)-2. Larger compiler constant pool, larger program text storage area, better compile error handling, fix to DoCommand of multiple lines, changed scanner to allow quoted strings of up to 256 characters. Changed default for Declare Environment to be EXEC.ENV, changed Exec commands referring to PCL variables to require correct syntax for variable names (alphanumerics with underscore). Added system variables $TermNumber (number of controlling terminal) and $EMACSTerminal (nonzero if terminal can be "effectively" used by EMACS, 0 otherwise). 14-Aug-80 4(651)-2. Changed implementation of PTY/PCT close to try to fix "Device or Data error" in the Invoked fork when the PCL command completes with the fork still around.px 10-Aug-80 4(650)-3. Fixed error handling for type mismatch (such as "LET Sstring = Iinteger") to report "string missing" instead of "name not found." Fixed system name handling to reset name to EXEC at the completion of a PCL command. Fixed error handling for unrecognized statement keyword to point arrow at correct atom. Fixed DoCommand to handle multiple-line command strings better, and also to handle null strings at all. The Words field-option now allows for 100 keywords. Reorganized PTY/PCT handling to better handle the case of a DoCommand To statement while an Invoked program is being controlled; several logical errors were corrected which should eliminate some problems which people have been having. The parameter parsing for Declare Integer, Declare String, Undeclare, and other commands which parse PCL variable names, has been redone to allow better for variable names with underscores in them. The Number field-type now stores two results: The number in $VALUE, and the string in $ATOM. 5-Aug-80 4(647)-3. Merged support for PCT's into PCL sources; standard Exec will continue to use PTY's for the time being. Fixed case folding problem in Undeclare Command. 31-Jul-80 4(645)-3. Changed handling of Invoked forks: They are no longer kill when the PCL command terminates, but remain in the Exec's tables like any other user program; their I/O JFN's are redirected to the Exec's standard I/O JFN's, and the program is left in a normal state, where, for instance, a Continue command will work. The KILLPROGRAM statement will clean out the program if you want it that way. The statements GETTYPOUT and CLEARTYPOUT have been renamed to GETTYPEOUT and CLEARTYPEOUT; the older names will still be valid for a few versions. The version number inside Environment files has been changed to allow better error checking. The COMMAND declaration now permits any decent name for commands, instead of rejecting PCL reserved words. Some fields in the global symbol table have been expanded to allow larger code and constant areas in compiled PCL routines. The PTY used for controlling Invoked programs is now run in full duplex with echoing on. 19-Jul-80 4(643)-3. Declare Synonym FOO FOOBAR now creates an abbreviation entry instead of an entirely new command; for instance, you may want to Declare Synonym DI DIR to say that DI is enough to issue the DIRectory command. It is now illegal to try to declare a synonym named Original. The Original command has been changed to take the remaining text and go back to the top of command parsing with original commands assumed, instead of merely picking an original command; this allows you to define a PCL command named MACRO and still be able to say Original MACRO and run SYS:MACRO.EXE. The Write Environment command has been changed to Save/Environment, to minimize the number of new commands created by the PCL project. 18-Jul-80 2145 4(642)-3. Fixed quoted string parser not to skip the first character following the string. Fixed recursive synonyms from resulting in PDL overflow; now they just loop. Changed the command Set [No] PCL-Confirm- Declarations to Set Default Declare /NoConfirm or /Confirm, for more consistency with other defaulting mechanisms. Changed the field-type TAD to the more comprehensible DAYTIME. Changed the Synonym command to Declare Synonym, with Undeclare Synonym to remove them; this was to remove the conflict with the Systat command. Changed Dump (Environment) to Write Environment to remove conflict with the Dump program. Added Undeclare Original-Command, to remove standard commands. Added code to maintain the command keyword table better and to keep abbreviations consistent. Corrected file name parser to give correct self-help in Declare commands. 17-Jul-80 1445 4(641)-3. Fixed DoCommand to handle multiple lines. Changed definition of quoted string to allow two double-quotes to result in a double-quote in the string. 10-Jul-80 1100 4(640)-3. Fixed problem with running PCL commands from Take command files. Changed Declare, Undeclare, and Information Variable to allow variable names to contain underscores; due to problems with COMND, this could not be done for the Set command. Changed format of environment files: Environment files now contain an environment file format number, which, when loaded by Declare Environment, must match the current format number. This is to allow changes in the format of the file to be applied with some organization. Added system variables $ConnectedDirectory and $Quote, containing the current connected directory name and a double quote, respectively. 03-Jul-80 1544 4(637)-3. Changed compiler scanner to regard formfeeds the same as linefeeds. Fixed $FILES to include the device or directory if not the same as the default. Changed substring extraction to not issue an error if the length requested exceeds the length of the string; instead it extracts up to the end of the string. Also, you can now specify an asterisk for the length in a substring, and it will extract up to the end. Changed compiler error printer to recognize tabs in the source line and space properly. Changed $MergeTAD and $OutputTAD to be typed procedures; added system procedure $InputTAD; see PCL.DOC for details. Fixed Abort statement to accept expressions instead of only primaries. 01-Jul-80 1337 Fixed bugs in parse failure detection and Declare Environment memory allocation. 30-Jun-80 1255 Fixed bug in cleanup which left Invoked fork around. 29-Jun-80 1233 Fixed bug in Declare Environment regarding command keyword table allocation. 28-Jun-80 1434 4(636)-3. Merged standard CMU Exec and CMU PCL Exec together again. <DK32>EXEC.EXE is now identical to standard CMU Exec except for the absence of the CG-PCM system, the presence of PCL, and the use of the name COMMAND.CMD where COMAND.CMD is usual (this last will only hold until the PCL Exec becomes the standard system Exec). On July 1, this CMU PCL Exec will move to NEW:, for probable installation on SYSTEM: later in the summer. 271438 Fixed bug in referencing global variables. 271340 Fixed bug in procedure calls. 270937 Fixed $Readbinary to fetch the length argument correctly. 260910 4(635)-3. Added SET [NO] PCL-CONFIRM-DECLARATIONS which sets a job-wide flag, indicating to Declare whether to confirm its actions (with the message "[Command FOO declared]"). Added switches to Declare command to indicate for the command whether to confirm ("/CONFIRM") or not ("/NOCONFIRM"). 251052 4(634)-3. Fixed bugs in Procdef execution and $ReadBinary. Replaced the obscure parse-option FILEDEFAULT with four parse-options for FILE: Default_DEV, Default_DIR, Default_NAM, and Default_EXT. Changed names $IDCNV, $ODCNV, and $ODTIM to $MERGETAD, $EXPANDTAD, and $OUTPUTTAD. Added CLEARTYPOUT, which flushes fork output like GETTYPOUT $NUL; this may make $NUL superfluous, and it may go away. 210128 4(633)-3. Implemented TO option to DoCommand. Removed Accept statement; added system procedure $READBINARY which is similar; see PCL.DOC. 200242 4(632)-3. Fixed Exec to properly erase PCL storage areas when restarted with CINITF set to zero. Fixed Declare to give ?File not found. 200204 4(631)-3. Reimplemented synonyms to coexist better with PCL; synonyms now share some PCL Command logic at execution, and are saved and restored in Environment files. Assorted fixes made to Procdefs, which seemed a bit broken. $USERNAME fixed. Bowing again under the weight of public demand, the Declare command once again confirms its actions. 190524 4(630)-3. Implemented environments. The DUMP command will write a file containing all the commands, procedures, procdefs and variables defined in the Exec; the default file is EXEC.ENV. The Declare Environment command will read those environment files and define everything in them. Bowing under the weight of public demand, the Declare command no longer confirms its actions. Also, if you give a Synonym command with just one argument, it deletes the synonym. 180420 4(627)-3. Added Synonym command to Exec; some think that this is related to the PCL project, so it is here in the PCL Exec instead of the standard Exec. This is a way of creating new names for existing commands. For instance, SYNONYM S SYSTAT makes an entry in the command table named S which, when executed, runs the SYSTAT command. 180234 4(626)-3. Implemented Select as described in PCL.DOC. Implemented Declare PCL-Routines from terminal: If you hit carriage return instead of specifying a file name, the Exec reads the source from your terminal, the same as it would from a disk file, up to an escape or ^Z. 172325 4(625)-3. Moved PCL command FLDDB to more permanent location; it should now be (more) possible to create a customized Exec by defining some PCL commands and saving the Exec in a form in which it can be run by others. Added system integer variable $TERMWIDTH, which has the width of the controlling terminal; added system integer procedure $INTEGER which takes in a string and returns the value of the decimal integer in the string (it presently uses the NIN JSYS and follows its rules), or returns zero if there was any error. Removed procedure $FINDCH and replaced it with integer procedure $SEARCH(string,string) which searches for string2 in string1 and returns the index of the first character, or zero if the target wasn't found. 162212 Fixed error in compiling several routines in a single source file. 162142 4(624)-3. Added Original command to invoke standard Exec commands which have been superceded by user commands; added Original option to DoCommand. Changed SETNM logic so that, while a user command is running, the public program name is the name of the command. 161911 4(623)-3. Reorganized code to handle duplicate commands (those with the same names as standard Exec commands); should work better now. Files being compiled are now read into a better location in memory; new location has chance of clobbering other tables, and is a preliminary step towards adding the Require statement. Errors during execution now always report the name of the command in which the failure occurred. Added preliminary code for handling reparses during COMND, to be used to support subcommands. 160202 4(622)-3. The Exec now has only one command keyword table, instead of the two we have had so far. The table contains both the user-defined commands and the standard Exec commands; when you type "?" you see only one list of commands. Recognition will now work the same for all commands, whether standard or user-defined. If you define a command with the same name as a standard command, the original definition is superceded and (for now) totally inaccessible (the Original command, and the Original option to DoCommand, will deal with this); if you then Undeclare your command, the original meaning reappears. This only applies to commands with exactly the same name; if you define a COPYFILE command, the COPY command is still accessible, though until you type the space after the "Y" the Exec can't tell which one you mean. Also, if you specify ParseOnly to a Directory or Username Parse, the resulting string is now simply what was typed in, instead of whatever was returned in AC2 by COMND. 122142 4(621)-3. Implementation of system procedures and variables changed; all system names are now defined an a small MACRO module, suitable for local-site customization. Some system procedures have changed: $GETTIME and $GETDATE are now variables $TIME and $DATE; see PCL.DOC. Also, in the WORDS field-option, any underscores in the keyword or switch will be converted to hyphens. 100355 4(620)-3. Typed procedures implemented; user declared procedures may return integer or string values, which may be used in expressions as primaries. Almost all system procedures have been redefined as typed procedures, which return an appropriate integer or string value; see the current PCL.DOC for details on the system procedures. A new system integer variable has been defined: $LASTERRCODE returns the last JSYS error code ($LASTERROR returns the text of the error message corresponding to this code); this may be useful in handling error cases in complex Parses. Also, the field-option ParseOnly now has meaning for a FILE field-type: It sets GJ%OFG in the GTJFN block; I'm not sure that this is all we need, besides general wildcards in filespecs (which will come later). 080135 4(617)-3. It is now possible to intermix Commands and Procedures in the same PCL source file; you now Declare PCL-Routine <Filespec> to declare all the Commands and Procedures in a file. This means that Declare Command and Declare Procedure are no more. When executing Procdefs, you can now specify actual arguments as quoted strings if you wish to have arguments with spaces in them. For instance, an invocation like DOSTAT "DK32 JS5A" has only one actual argument, which would be substituted for $1. There have also been several internal reorganizations, mostly oriented towards reducing the size of certain constant tables. 080114 Fixed bug in string constant allocation which defined "IS" the same as "ISNULL". 061942 4(616)-3. Fixed bug which caused "Unrecognized command" errors in DoCommand; PCL now saves and restores GTJFN default block. 042102 Fixed bug in command arguments: The variable declared by a TAD field was being declared as an integer instead of a string. 041950 4(615)-3. DO statement implemented, in all four forms: DO-WHILE, DO-UNTIL, WHILE-DO, and UNTIL-DO. System variable $CR added; contains just a carriage return. Parses of Keyword and Switch fields redefined to return the name of the keyword or switch in $ATOM, in addition to placing the associated number of $VALUE. Switches with colons (to indicate values) now work; you can parse switches like /LIMIT: with a word list like WORDS(LIMIT::1,...). 041508 Doubled size of compiler's constant work area; now two pages. June 021540 Recompiled with new version of BLISS (2(124)). 301705 4(614)-3. Added field-option FILEDEFAULT to modify FILE field-types. This builds default strings in the GTJFN block for device, directory, name and extension, according to the quoted string provided. Thus, FILEDEFAULT ".PCL" sets the .GJEXT word to a string containing "PCL" and sets all the other words in the GTJFN block to zero. Two more new options for FILE are INPUT and OUTPUT, which set GJ%OLD and GJ%FOU. 301518 4(613)-3. Bugs fixed in Declare (command keyword table not being built early enough) and global string storage maintenance (bad call to a space allocator). Substring extraction now allows arbitrary integer expressions in start and length fields. New system variable, $CURTAD, contains the current date and time in system internal format. 300014 4(612)-3. Implementation of non-binary Accept changed to use more flexible TEXTI% JSYS. The returned string still contains the final carriage return and line feed. 292317 4(611)-3. Added Noecho option to Accept, good for reading passwords; the string you get back includes the final carriage return and line feed, if this is generally not desirable send me a vote. For even more compatibility, Display now by default appends a carriage return and line feed to your output, so you need fewer $CRLF's (probably none at all); a Noreturn option suppresses this. Added service routine $GETDATE(string), returns date string like "29-May-80". 292212 4(610)-3. Many fixes: When you supercede or undeclare a command or procedure the text area is released properly (it missed a few words); a register clobber problem which caused looping was fixed; GetTypOut no longer overwrites old data with new; a bug with substrings starting at the wrong location was fixed; a bug in string concatenation with two complex expressions was fixed (they were being popped from the stack in the wrong order); a ^C during program execution (Invoke, etc.) now cleans up the program fork and releases the PTY. Many developments: Every time PCL execution returns to the top (i.e., terminal) level, it frees its internal string space and PMAP's the pages away; this makes string space much more stable. Several parts of the GetTypeOut mechanism were made more resistant to races. An old restriction is now enforced: You cannot use Parse after a successful Parse EOL, nor after various operations which use the terminal outside the Parse system (such as Display); this should make for less confusion as to what is happening on the screen. The Typein operation was changed to, by default, add only a carriage return to the input, instead of a carriage return and a line feed; this was confusing programs. 282056 4(607)-3. Complex expressions should now work for actual arguments in CALL and CALLI. Problems fixed: ^C during Parse should no longer cause PDL overflow; garbage after a Parse has a better error message; you can now leave a stray semicolon in a CASE, like "CASE ... BEGIN ... [9]: EXIT; END"; a problem with IF getting "Can't recognize expression" has been fixed; and, a parsing error terminated with an Escape now properly returns the carriage before typing the error message. 272253 4(606)-3. COMPLEX EXPRESSIONS ADDED. Not all cases are implemented yet, but in most places where before you could specify an integer-primary or string-primary you can specify a general integer-expression or string-expression; you are no longer limited to <Identifier> <Operator> <Identifier>. The one case I can think of is in actual arguments to procedures and service routines; those must still be simple primaries for the time being. All this has excellent chance of not working, of course, so please let me know what won't compile or execute properly. As part of this, I discovered that the syntax of the substring operator was inconsistent with certain field-descriptors (since the left parenthesis in "PARSE TOKEN KeyTab(" could be starting either a substring or a field-option-list). So, SYNTAX OF SUBSTRING OPERATOR CHANGED: You now use square brackets instead of parentheses, like this: PARSE TOKEN KeyTab[Indx:1] (Default "*") 271416 4(605)-3. SYNTAX OF CASE CHANGED. Instead of simply listing the statements with semicolons between, you must now identify for each statement the corresponding index; also, you must specify the bounds of the possible indices by giving the lowest and highest index. This means that the first statement is not necessarily indexed by "1". For instance, CASE I FROM 2 TO 8 OF BEGIN [3]: DISPLAY "a three"; [6]: DISPLAY "a six"; [2]: DISPLAY "a two"; [INRANGE]: DISPLAY "Something between 2 and 8 but not 2 3 or 6" END; will execute the statement with the tag "[3]" if I is three, and the statement with the tag "[INRANGE]" if it is in range (according to FROM 2 and TO 8) but not otherwise specified (for instance, a five). If the number is outside the range, an execution abort occurs. 270047 4(604)-3. SYNTAX OF PARSE CHANGED. Instead of IFPARSE-THEN-ELSE, the parsing statement is either PARSE <Parse-specification> or PARSE ( <Parse-item> { ; <Parse-item> ... } ) <Parse-item> ::= <Parse-specification> ::= <Parse-specification> : <Statement> ::= OTHERWISE : <Statement> The first case specifies that the next field has only that one possibility; if it matches the specification then execution continues, otherwise execution aborts with an appropriate error message (such as "No such switch or keyword"). For instance, I might want to PARSE NUMBER (HELP "The number"); LET REPEATCOUNT=$VALUE; The second case specifies a list of possibilities, resulting in a chain of FLDDB's. For instance, I might want to parse PARSE (TOKEN "*" : Let Switch=999; KEYWORD (WORDS (ALPHA:1,BETA:2)) : Let Switch=$Value; OTHERWISE: GOTO Cmplx) which will set SWITCH to 999 on a star, or to the value of the keyword entered, and will jump to label CMPLX if neither describes the next field. If there is no success-statement for a parse-specification, and that parse-specification matches the input, execution simply continues after the PARSE; if no OTHERWISE is specified execution aborts with an appropriate error message. This syntax, you may note, is the same as the syntax of the Command formal arguments list, implemented earlier. (Please don't forget that they have entirely different semantics; read the description of Command arguments if you don't understand this.) The only syntactic differences have to do with error handling and the storing of results: The PARSE statement allows an OTHERWISE case, and an arbitrary statement (or compound statement), while the Command argument list allows an error jump for each field and stores a result in a specified variable. They are close enough to allow them to use the same <Parse-specification> compilation routine; this version of Exec is a page smaller than its predecessor. 262223 4(603)-3. Again, mostly internal changes, with excellent chances of causing problems. Also, TYPEIN now by default provides a free carriage return after your text line, in the same manner as DOCOMMAND; an option to TYPEIN suppresses the carriage return: TYPEIN NORETURN <String-expression>. 242323 4(602)-3. Many internal changes: More commentary, better use of structure references, some routines removed; excellent chance of particular things not working due to one of these changes. Several fixes: Substring extraction with negative length now returns a null string; procdefs with lines missing the initial "@" now work; the state of the terminal and the Exec command state tables are restored more consistently after command termination, resulting in the next prompt appearing on the left margin where it belongs; this also means that ^H now works after a Parsing error; ^T will not blow up the Exec if used too often; DECLARE TAKE-FILE *.PDF now works. This PCL Exec now uses COMMAND.CMD instead of COMAND.CMD, as long as it is still experimental. The execution error "Undefined procedure" now includes the name of the missing routine. 211558 4(601)-3. When PCL resets itself, it now resets a flag which controls how the main Exec runs programs, to revert to normal running. Source files containing line sequence numbers will now work. A bug in compiling the IFPARSE statement was fixed; if no final ELSE is given, execution falls through to the next statement instead of into the first THEN-statement. 201657 4(600)-3. When compilation error is reported, the compiler will also print out a line with an arrow pointing to the offending atom. When execution error is reported, the current program and local variables are properly cleaned up. The "Undefined procedure" execution error now contains the name of the procedure. The definition of <Procedure-body> has been changed to allow a simple statement; this allows brief commands like COMMAND S; DOCOMMAND "SYSTAT ALL NO OPERATOR" to be coded without a BEGIN-END pair. 191737 4(577)-3. Fixed problem in memory allocation. Also, when you get a compilation error, the compiler will type out the source line which it is currently working on. 180030 4(576)-3. Fixed problem in allocation of command argument variables. 171525 4(575)-3. When, in a command, you specify neither command formal arguments nor IfParse statements, you get a free PARSE EOL at the beginning of your command. 161530 4(574)-3. Implemented "Command arguments" facility. You can now get PCL to parse the arguments to your command without going through the IFPARSE statement system. You can provide in your command declaration a list of formal arguments, which the system will parse for you and store into the variables you say. For instance, a very simple command could be: COMMAND SY (USERNAME:HISNAME); BEGIN DOCOMMAND "SYSTAT A "+HISNAME END for which the system would automatically parse a user name from the user's command line, store the name in a variable, parse an end-of-line, and then start the text of your command. So, the Command declaration is now COMMAND <Identifier> ( <Command-formal-argument-list> ) <Command-format-argument-list> ::= ( <Command-argument>; ... ) <Command-argument> ::= <Parse-type> ( <Parse-option-list> ) ( :<Identifier> ) See section 1.1 of the current PCL.DOC for the full description. Problems fixed: Inability to store into read/write system variables (such as $NUL); null last statement in CASE statement list; command keyword table expanded from 8 to 64 words (will be made effectively unlimited in the future); fixed problem with local variables being clobbered during procedure calls; fixed problem with looping after multiple clals of the same command. 131455 4(573)-3. Fixed problem with defining and calling procedures without arguments. Fixed problem with having label definition immediately after declarations. Added system variable $LASTERROR, containing text of last JSYS error (for instance, after a KEYWORD parse fails, it contains "Does not match switch or keyword"). 120124 New version, 4(572)-3; I will increment the edit number so we can tell what PCL version we are using. I probably will not keep this number compatible with CMU Exec edit numbers. In the interests of readability, the PARSE statement is now the IFPARSE statement, since it suggests the form of an IF statement; more input on the meaning of Parsing would be welcome, if IFPARSE-THEN-ELSE is not to be the ultimate scheme. To complement the GUIDE statement, a new parse-type has been added to parse a noise word like any other parsed field: IFPARSE NOISE "TEXT" will succeed or fail according to the usual criteria for noise words. New statements: NOP is a null operation; EXIT will terminate the command without an error indication. The first step towards DOCOMMAND ORIGINAL has been taken (the statement will be compiled) but I have not implemented the real Original code. New parse-options for the TAD parse-type: TIME will leave CM%IDA zero, DATE will leave CM%ITM zero; also, all TAD parses store the internal date and time in the $VALUE integer. To manipulate internal date/time words, there are three new service routines: $ODCNV(integer TAD, YEAR,MONTH,DAYMONTH,DAYWEEK,HOUR,MINUTE) breaks a TAD into components, $IDCNV(integer YEAR,MONTH,DAYMONTH,HOUR,MINUTE, TAD) merges components into a TAD, $ODTIM(integer TAD, string S) converts a TAD into a date and time; see the JSYS descriptions. Service routine $CVITS now has an optional third argument: an integer radix; it is much much faster if you use decimal (the default). New service routines $CVCTI and $CVITC are useful for manipulating control characters: $CVITC(65,string) makes a string containing "A" (ASCII 65), $CVCTI("A",integer) sets the integer to 65. The system variable called $FLUSH is now called $NUL for uniformity. A new system variable, $TTYPE, contains the GTTYP% index of the job's controlling terminal. May 042255 New system, based on CMU Exec, with innumerable internal changes. The only external change I can think of is that I fixed the problem of Docommand clearing the local variables. There is, however, an excellent chance of things in general to fail, due to the internal reorganization. 171027 Fixed problem with Procdef arguments. 161043 Added labels and GOTO to procdefs. Labels are alphanumerics of up to six characters, followed by two colons. The command "@GOTO Label" will search FORWARD for that label. The corresponding BACKTO command, to search backward, will be implemented eventually. 160901 Fixed problem with command/procdef redefinition, which caused keyword table entries not to be cleared. Added SCTTY% to Invoked program I/O redirection, so TOPS-10 program I/O can be intercepted as well. 141104 The names of the service routines have been changed: they now all starts with a dollar sign, the same as the system variables. There is also a new service routine, $FINDCH(String1,String2,Integer) which searches String1 for the character String2 and stores its index (or 0) in the integer; the first character of a string has, as usual, index 1. 121345 Long series of internal cosmetic changes; addition of new stack pointer code for future use. 121122 Added INFORMATION VARIABLE, SET INTEGER-VARIABLE and SET STRING-VARIABLE commands. 120605 Added ability to store into system variables, and to have more complex system variables (based on routines, not just data words). Added readwrite string system variable $FLUSH which returns a null string and throws away any string placed in it. Fixed problem with parse-option StdHelp; fixed problem with Undeclare not properly defining its help message. 110950 Added system string variable $USERNAME. Fixed problem with Undeclare not really removing the command. 110723 Added command INFORMATION PCL-OBJECTS which lists the defined globals. 110430 Allowed ability to define service routines and internal variables with names greater than five characters long; GTIME is now GETTIME and LNGTH is now LENGTH. Also, unary minus for constants was fixed somewhat. 110330 Added Case statement. CASE Primary OF BEGIN stmt1;stmt2;stmt3;...;stmtn END executes the n'th statement based on the integer Primary; 1 gets the first statement. An integer out of the range [1,n] results in a no-op. Does popular demand require me to do something besides a no-op? My next option is to add an ELSE Statement (or perhaps OUTRANGE Statement) after the last END. 110212 Changed Accept Binary to require break character: Accept Binary(I,S) says to read (in binary mode) up to I characters, or until the first character in string S is read (the break is included). I have recoded so that the ordinary Accept is simply a special case of up to 100 characters terminating with a line feed. Also, a new system variable $CRLF contains a carriage return and a line feed. 110100 Fixed error in local variable allocation which caused locals not to be cleared at the start of a command. 110010 Fixed error in Parse Keyword which caused loop after parse completed. 102330 Added source line numbers to internal codes; execution error messages now include name of command/procedure and line number. Fixed a problem with substring extraction getting "Incorrect operand type." 100709 Fixed some problems in string instructions. Also fixed the CVITS service routine; it was returning a string with an extra null at the end. 100610 Added ABORT statement; ABORT <String-primary> issues a fatal execution error with the provided string as the error message. 100548 Fixed problem caused when user gave me no Return statement. Now you get a return at the end of your code automatically. 100540 Removed a restriction in actual-argument passing which prevented system variables from being passed. System variables should now work as actuals to a Procedure or a service routine. 100345 Added Parse-option STDHELP, allows standard help along with your HELP Parse-option. Added Parse-type NODE. Fixed comments to work anywhere on the line, not just at the left margin. Changed mechanism for compiling multiple commands/procedures from one file to allow semicolons between commands/procedures; it's optional but it looks better to have a semicolon after a final END. 100310 Fixed Parse Token. 100245 Changed KILL statement to KILLPROGRAM to end conflict with standard KILL command. Added a cludge of little beauty but much utility: Like all PCL identifiers, command names may have underscores in them in the PCL source file. However, they are immediately converted to hyphens, since this is the style permitted for COMND% keywords. That is, if your source file says COMMAND MM_SYS the resulting command will be called MM-SYS. Since hyphen is illegal in PCL identifiers (but the underscore is permitted) and the underscore is illegal in COMND% keywords (but the hyphen is permitted), this should ruin nothing existing. This only applies to commands, not to procedures or global variable names. It has been observed that, because of COMND%'s prohibition of underscores, underscores will not work in global variable names (since can't Declare them); this will continue as a restriction. If there is sufficient demand, perhaps I can make a similar translation (that is, convert hyphens entered at the Declare command to underscores internally). 100216 Turned on DEC multiforking and expanded runtime string storage from 1 to 8 pages. 090345 Added Accept statement. ACCEPT Stringvariable reads a line from the terminal and stores it in the variable; ACCEPT BINARY(integerlength) string reads in the specified number of characters from the terminal in binary. 090230 Recoded Declare (and everything else) to allow multiple sources in one file; when you Declare Command file.ext every command in file.ext is compiled and defined. 090108 Fixed problem with program invocation (Rescan buffer was left full of data; now I clear it). Added DISPLAY BINARY; some reorganization. There is a known problem where commands with underscores in their names (such as MM_SYS) will not work exactly as expected (the first Guide will never happen and will cause immediate confirmation); this is a COMND% problem which will have to reported to DEC. The manuals do not mention it, but underscore is not a truly legal character for a .CMKEY keyword. 070030 Fixed problem with Procdef actual arguments. 062330 Fixed problem when PCL source file had no CRLF after the last line. 060600 Defined Procdefs. DECLARE TAKE-FILE filename.PDF will define an Exec command, consisting of the commands in the file. Each line in the file starts with an atsign and contains one standard Exec command; ultimately lines starting with asterisks will be passed to a user program. There are arguments of a sort: At command invocation, the atoms in the command line following the command name are remembered, and substituted when a $n appears in the original file. That is, $1 substitutes the first atom, $2 the second, etc., up to $9. The general command generation seems to work, as does the rest of PCL (that is, I don't think I broke anything); the argument mechanism is untested. 050030 All remaining parse-types added (all that I think worthwile, anyway): Keyword, Number, Switch (no way to say that a switch wants a colon after it, though), Inputfile, Outputfile, File (no way to specify defaults), Field, EOL, Directory (results in $ATOM), User (results in $ATOM), Comma, Device, Text, TAD (stores date-time in $ATOM, no way yet to say only date or only time), Quotedstring, Token. I took out Unquotedstring until it is really needed, since defining the break mask will be ugly. I haven't tried any of these, but they were small changes; I do know that everything that worked before still works. Note: If you misspell the name of a statement keyword (such as saying PERFORM instead of DOCOMMAND) you get the error "Labels are limited to five characters." This is due to cheapness in parsing; please bear with me. 032327 Negative constants can now be used as integer-expressions (but NOT as integer-primaries). The equals sign and EQL may now be used interchangeably, as well as < and LEQ, and > and GTR. [Since 7-bit ASCII has no codes for LEQ, GEQ, or NEQ, I can't define them.] Bug fixed in compiling string comparisons. 032301 PERFORM is now permanently DOCOMMAND. New system integer variable FILEV, contains version number of last file Parsed. 032213 Fix bug in procedure parameter passing; didn't work at all. 030405 LENGTH no longer exists as a special integer-primary. There are two new CALLI routines: CALLI LNGTH(string,integer) stores the length of the string into the integer, CALLI CVITS(integer,string) stores the representation of the integer in the string. In time the names will become more mnemonic; right now I am limited to 5 character service routine names. 030307 Got Procedures (distinguished from Commands) working; parameter type checking, parameter passing, all working. A procedure header is PROCEDURE name(type name,name,...;type name,name,..); commands must now start off COMMAND name, not PROCEDURE name. 030155 Implemented WORDS parse-option; KEYWORD seems to work. PARSE KEYWORD (WORDS(AKEY:1,BKEY:2,CKEY:3)) THEN LET I=$VALUE gets 1,2, or 3 into I. 022316 Much fixing in program control; Typein now works fine. 022136 Parse field-types have been redefined to have mnemonic names. They are now KEYWORD,NUMBER,SWITCH,INPUTFILE,OUTPUTFILE,FILE,FIELD,EOL,DIRECTORY,USER, COMMA,DEVICE,TEXT,TAD,QUOTEDSTRING,UNQUOTEDSTRING,and TOKEN "the token". (The last has a different syntax.) Also, a new parse-option is PARSEONLY which turns on the CM%PO bit; it has meaning only for DIRECTORY,USER, and DEVICE; see MCRM. Presently, only NUMBER,INPUTFILE,OUTPUTFILE,EOL,DEVICE, and TEXT have been tried; they seem to work. The others range from merely untested to uncoded. 021933 Variable names are now 39-character alphanumerics; underscore is now an alphabetic. 020414 The statement GUIDE "the string of your choice" seems to work, as does field-type CMDEV. 020350 The compiler now prefixes its error messages with, for instance, "Line 4: ". 020324 Added new integer-primary, LENGTH <String-primary>; LET I=LENGTH S sets I to the length of S. Added substring extraction: <String-expression> ::= <String-primary> ( <Integer-primary> : <Integer-primary> ). The first integer is the index of the first character of the substring (the leftmost is 1), the second is the length. LET S="abcde"(2,3) sets S to "bcd". 020202 Program control works; that is, Invoke starts a program going, Kill kills it, the program's output gets buffered, and Gettypout retrieves the output. Typein doesn't work; the SOUT% to the PTY incorrectly returns "Buffer full." 012340 A lot more work done on program control. All the routines are in, but do not work yet. 012220 Added code for TYPEIN and GETTYPOUT statements; have yet to define WTFPGM routine, so program control still does not exist. 011902 Changed syntax for use of system variables; now they are possible primaries for any purpose. That is, <Integer-primary> ::= <System-variable> and <String-primary> ::= <System-variable> are now allowed. Also, the plus operator now works on strings; "systat "+"dk32" gets you a new string "systat dk32". 312245 Global variables seem to work; I could Declare one and then store and fetch it from a procedure (after an External String declaration). There may be some problems with case folding lying around; let me know if you see one. 312224 Fix bug causing Exec in which a Parse had been done to be unable to parse files (even in regular Exec). 312152 The Else clause of a Parse now is followed by a complete statement; if it is a Parse, you get field linking; if not, the final Else is taken if nothing parses. 311737 A line starting with an exclamation mark is now a comment line. 292300 I got tired of circumventing the lack of a Compound-Statement construct, so I defined it. Now, one more possibility for <Statement> is BEGIN <Statement> {; <Statement> } END. It seems to work. That is, I was able to say PARSE CMIFI THEN BEGIN LET S=$FILEN; LET T=$FILES; LET U=$FILEL END; 292245 Added code for parse types CMIFI and CMOFI; both store name of recognized file in new system variables $FILEN (name.typ.gen), $FILES (name.typ), and $FILEL (dev:<direct>name.typ.gen). (The names are Normal, Short, and Long.) Also, "Parse fieldtype;" is now legal; the Then clause is no longer required, and if absent then nobody knows (or cares) whether the Parse succeeded or not. 292130 Perform seems to work now. 291800 Fixed reparsing code; appears to correctly handle reparses and ^C. It may lose garbage in the middle-term storage pool, but it will run. Also, Default seems to work now. 291630 Parse CMNUM (Radix n) works. 282020 Parse options Default,Help,and Radix are in; Help works fine but Default gets you a reparse when invoked; I haven't tried Radix. Reparse does not work at all, and is what causes the loop; the reparse signal happens at a very bad time, and I haven't done anything to reset the system yet. 281900 Parse now works; fields CMNUM,CMTXT, and CMCFM are implemented and seem to work. 280400 Typed in code to implement $ATOM, and to have .CMTXT parses store atom buffer into $ATOM; all untested. 280330 System variables and service routines seem to work; (I'll need them to get the answers out of Parse); presently there are only variables $JOBNO and $VALUE and service routine GTIME(STRING). Parse does not work at all; it hangs unrecoverably, and I haven't figured out why. 280245 Internal representation of string variables changed to always have a null stored after the string (invisibly; not included in the count); makes interface with system much easier, therefore simplifying Parse pre- and post-processing. All PCL dynamic storage allocators scrapped, replaced with calls to standard Exec allocator; the free pools are still separate. 280001 All procedure/command names and variable names should now be up to 39 characters long. command and procedure replacement is in: the definition is replaced and you get an informational message. All the Parse field type names are now the same as they are in MONSYM, without the initial period: CMKEY,CMSWI,CMNUM,CMCFM,... Global symbol table now has different class for procedures and commands, will be exploited someday. Mysteriously, the Exec has just shrunk by a page, even though I have been adding code (or at least functionality).