A worked example of a few commands in CCL The user command: ALGOL filename The users own USERCCL.CCL $2511ALGOL (1) ?1Program (2) *A60 %1%%1=% (3) a) The command decoder MCR finds there is no task ...ALG and calls CCL b) The CCL decoder finds a user file specifying CCL commands of his own and scans that first, overiding any system definitions. c) The line (1) is found and matches the keyword ALGOL typed by the user. The number of parameters (min allowed, and max to be asked for) are extracted from the command line. ( this all in LOOKUP) d) The main body now finds enough parameters have been supplied to fulfil the minimum requirements of the command [ 1] and goes to look for a skeleton command line (3). e) The skeleton is copied to an output buffer until a "%" character is found when FIXUP is called to insert parameters, after this stage the ouput buffer contains "A60 filename ". f) Another parameter spec is found %1=%. In this case a prefix character "=" ( the other is ",") has been specified, to be put infront of the parameter if it is non null; the parameter is non null thus "=filename" is inserted. g) The end of the skeleton command line is reached, and the final command "A60 filename=filename" is resubmitted to MCR. The above was a very simple example, let us look at some of the other possible calls that could have gone on variations of the same route. User command ALGOL a-c) as above. d) not enough parameters have been specified, the minimun # not to cause prompt for parameters has been set as 1 and 0 have been given, so the number of prompts to be given, and parameters input, is set to the 4th of the numbers on line (1), in this case 1 also. The routine PRMPT is then called to find a command line in USERCCL which begins "?n" where n is greater than the number of parameters already availiable. "?1" is found and so a question is asked for param number 1, it is: Program? which is answered on the same line. The effect of the answer given to the prompt can be one of 3 sequences depending on the answer. If the answer was CTRL/Z, then CCL abandons the processing of the command. If the answer was a return only, then the parameter will be set to a null string, and when the second substitution is attempted for %1=% it will be found that there is no text so the entire parameter will be bypassed resulting in simply "A60 " being sent to MCR. If the result is non null then it will form the parameter substituted as above. some more examples (again from an IAS user who moves occasionally to our machine). $5811DEL/KEEP !the IAS command DELETE/KEEP filename ?1Filename *PIP %1%/PU since EDI is not installed on our machine ( the CCL command EDIT file is used as TECO %1.FTN% ) he wanted the use of EDI as on the IAS system. $3611CREATE $2411EDIT ?1Filename *RUN $EDI/PRM="%1%" however he could still have these commands while other users had, for example, EDIT file -> TECO file.ftn and $5822CRE/DIRE $6822CREA/DIR $7822CREAT/DI $8822CREATE/D ?1Uic ?2Device *RUN $UFD/PRM="%2:%%1%" as another reasonable IAS style command