.; CLONE - CLONE USERS GUIDE .; LAST EDIT: 16-NOV-81 .; REFERS TO CLONE V003 .page size 63 132 .left margin 15 .right margin 115 .figure 6 .c CLONE .skip .c User's Guide for version V003 .skip .c Document Revision .c NOVEMBER 1981 .skip 5 .p CLONE is a high-level command language designed for use in fields such as bio-medicine where complex operations are regularly performed by users who are not computer programmers. The object of CLONE is to provide a flexible means of standardising operations whilst not sacrificing any of the generality in the programs used for processing. The implementation described here is for the DEC system RSX-11M. .p .skip .p The CLONE command language was designed by Dave Plummer and Andrew Todd-Pokropek at University College Hospital London. It was the subject of the paper 'Modularity and Command Languages in Medical Computing' presented at the Fifth International Conference on Information Processing at Nashville in June 1977. .p This implementation for the PDP11 under RSX11M is by Dave Plummer. It was initially developed whilst working for the C.E.A. at Orsay France and further extended at UCLA. .p This software is available to all non-profit making organizations on request and on the understanding that it will not be transmitted to another party for finantial gain. .p Feedback from users is realy important to a project of this size. Please send any: comments, modifications and bug reports to: .skip 2 .lm +20 .nofill Dave Plummer c/o Division of Biophysics Departement of Radiology UCLA Center for the Health Sciences 405 Hilgard Avenue Los Angeles CA 90024, USA .fill .lm -20 .pg .title ###############CLONE user's guide .subtitle ###############Introduction .figure 3 .center INTRODUCTION .skip 5 .p The primary object of this document is to explain the details of the CLONE language to the user who is already familiar with some programming. A limited knowlege of RSX and a high-level language is assumed, as are the basic concepts of 'block-structure'. The novice user will still find much information which is useful however. For certain features described below the document: .index Val Terminal Communications Package VAL TERMINAL COMMUNICATION PACKAGE should be consulted for further details. .p CLONE (and other similar command languages) give the following advantages: .skip .lm +5 .i -5 1)###Less operator intervention is required in a process controlled by CLONE thus the probability of error is greatly reduced. .i -5 2)###CLONE may be used to group all the questions for an operation at one point. This means that the operator does not need to remain by the terminal during long processing operations and may perform other tasks. .i -5 3)###CLONE enables a precise sequence of operations to be defined. Thus a protocol may be executed many times in exactly the same manner. This enables experiments to be performed more exactly, provides a written record of previous protocols and provides a formal method of defining a protocol. .skip .lm -5 .p Unlike system orientated command languages (indirect MCR in RSX), CLONE is designed to communicate with all programs in an applications package. This requires that all programs which are to take advantage of CLONE use a special set of utility routines for terminal input. These routines are described fully in the document: VAL TERMINAL COMMUNICATIONS PACKAGE; they provide a general purpose terminal interface for applications tasks whether they use CLONE or not. .pg .subtitle ###############Using CLONE .figure 3 .center USING CLONE .skip 3 .p .index macros .index compilation CLONE programs are referred to as macros. A macro is stored as text in a file and may be modified with the normal editor. When a macro is executed it is interpreted directly by the CLONE processor. There is thus no compilation stage and any modification is immediately effective in a program. .p .index @ .index escape .index immediate mode .index MCR command CL1 A CLONE macro may be started in one of three ways. 1) by typing the special character @ followed by a file name to any question posed by a program. In this case the specified file contains CLONE commands and replies to program questions. 2) Typing a CLONE command followed by ESCAPE to a question posed by a program. This causes that command to be performed immediately without the need to store any commands in a file and is known as IMMEDIATE MODE. 3) The MCR command CL1 may be issued followed either by a file name as in 1 or a CLONE command as in 2. .br .tp 7 Thus the commands: .skip .nofill .lm +10 PROGRAM REQUIRED ? @DK1:PROCALL PROGRAM REQUIRED ? PRINT 3756/3 >CL1 PRINT 46*32 .lm -10 .fill .skip all cause CLONE to execute and perform the requested function. .index interrupting a macro .index breakin commands .p The same mechanisms are available for interrupting a macro during execution. If a question is currently being posed, typing ESCAPE will interrupt the macro and provoke the prompt CL1>. Any CLONE command or commands may be typed in response to this prompt to print or modify variables, or STOP may be typed to terminate execution of the macro. If the macro is to be continued CTRL-Z must be entered to resume the macro and the current question will be re-posed. Exactly the same operations may be performed if CL1 is typed to MCR during execution of the macro and this thus provides a means of terminating a macro in mid-execution even when no questions are being posed. When a macro is terminated in this way any programs which it is running will pose their questions directly to the console. Such interruptions of an executing macro are known as BREAKINs. .p The following examples demonstrate the two mechanisms of interrupting a macro. .skip .nofill .tp 10 .lm +5 .i -5 1) PROGRAM REQUIRED ? @HELP HELP IS AVAILABLE ON THE FOLLOWING TOPICS: 1 ECAT PROGRAM NAMES 2 CLONE MACRO NAMES 3 WRITING CLONE MACROS ENTER OPTION ? CL1>STOP PROGRAM REQUIRED ? .tp 14 .i -5 2) PROGRAM REQUIRED ? @CPZDEF this is a macro in the ECAT package; STUDY NAME ? CPZ025 suppose this was not intended and CR has already been typed. The macro will continue to completion without asking any more questions but may take some time to finish. CL1 here CL1 is typed to no question; CL1>STOP CLONE prompts and the STOP command is given. NUMBER OF PLANES ? The current question is posed. Typically CTRL-Z would be typed to terminate the program. .fill .lm -5 .index STOP .index PRINT .index CTRL-Z .p As noted above, any CLONE statement may be executed during this 'breakin' mode. STOP will cause immediate termination of the macro. Statements such as PRINT may be used to examine the contents of CLONE variables, the level of tracing may be changed and the current values of variables may be updated. All this provides a powerful interactive de-bugging feature. When an interrupted macro is to be resumed CTRL-Z should be typed. In the case of a macro interrupted during a question the question is re-posed, otherwise the macro simply continues. .index nesting .p An important feature is that CLONE macros may be invoked to control other CLONE macros. Thus if @filename is typed in response to a question posed by CLONE, the current macro sequence will be placed under the control of the named macro. This nesting may be continued through an arbitrary number of levels. .skip 6 .index immediate mode macros IMMEDIATE MODE MACROS .p A macro is not necessarily stored in a file. A temporary macro may be typed whenever a question is posed and may be executed immediately to perform any simple repetitive operation. Suppose for example a program required a list of numbers and it was desired to reply with all the even numbers between 2 and 100, the following immediate macro would perform the function. .skip .lm +10 .nofill ENTER VALUE ? CL1>DO I=2,100,2 I .fill .lm -10 .skip This macro terminates and returns to the program as soon as all the values have been replied. Note that if the macro comprises several statements they must must be enclosed in brackets. .p Immediate macros may occupy several lines. However it must be remembered that they execute as they are typed (line by line) thus questions and messages occurring during the operation of the macro are intermixed with the statements as they are typed. Once an immediate macro terminates it is completely deleted and cannot be restored or saved. .pg .subtitle ###############Language description .figure 3 .center CLONE LANGUAGE DESCRIPTION .skip 3 .index block-structure .index statement .index block .p CLONE is a block-structured language. The basic element of the syntax is the STATEMENT. Statements may be grouped together in blocks to form compound statements which are syntactically equivalent to simple statements, thus in the descriptions which follow a block is also valid wherever a statement is indicated. A block is formed by enclosing one or more CLONE statements in parenthesis ex. .skip .i +10 (I=0 J=0 K=0) .p .index VOID and VALUED statements .index context Statements fall into two classes: VOID and VALUED. A void statement returns no value but may have some effect on the program execution. A VALUED statement, however, returns a value which must be absorbed somewhere (by assignment to a variable for example). In certain cases it is possible for a statement to be void or valued according to the context in which it is used. Typical void/valued statement examples are: .skip .lm +10 .nofill .i -10 void: STOP I=3 PRINT I .skip .i -10 valued: 3 C+D .skip .lm -10 .fill .p CLONE does not make any distinction between statements and expressions. An important feature is that blocks, subroutines and certain other statements such as IF may return values. A familiar example of a valued block is: .skip .i +10 3*(I-1) .skip where the valued context of the multiplication causes the block to be valued. The result of a valued block is supplied by the first unbound value. Thus in the following example I receives the value 3. .skip .nofill .i +10 I=(J=3 J PRINT J*2) .skip .fill Note that no special separators are required between statements; the binding of the individual operators separates the statements. Similarly, end-of-line has no significance in a valued context so: .skip .nofill .lm +10 A=2*3+ 4*6 .fill .skip .lm -10 is perfectly valid. .skip 2 .p The basic statement of CLONE which enables it to operate as a command language is REPLY. The statement: .skip .i +10 .index REPLY REPLY 100 .skip .index syncronization causes the specified value (100) to be used as a reply to the next question asked by a program running under CLONE. This is also an important example of a syncronization point between CLONE and the program as CLONE will not proceed beyond this statement until the program accepts the reply and, conversely if the program asks a question before the REPLY statement is executed by CLONE it will be suspended itself until the reply is available. .p To simplify CLONE macros the keyword REPLY is not required and may generally be omitted, thus the statements: .skip .i +10 .nofill J=J+1 J .fill .skip causes the current value of J to be incremented and then the new value replied to the program. Note, however, that a valued expression is only an implicit reply when it occurs in a void context; in a valued context replies must be explicit. .skip 6 .tp 6 .index seperators .index spaces .index tabs SEPERATORS .p Spaces are significant in CLONE only for seperating symbols of like type. Thus PRINT A is distinct from PRINTA. However beyond this function, spaces and tabs have no significance and may be used freely to improve legibility of CLONE text. .index comma .index semicolon .index colon .index newline .p The characters: comma, semicolon, colon and newline have rather more significance and are designated 'seperators'. They may be used to force the termination of an expression ex. .skip .nofill To distinguish: A - B a single implicit reply From: A, -B two implicit REPLYs .fill .p .index comments The Character _# is used to introduce comments. All text to the right of this symbol is ignored, thus the entire comment behaves as the seperator newline. .skip 6 .tp 6 .index variables .index variable names .index lower and upper case VARIABLES .p Values used during the execution of a CLONE macro are stored in variables. A variable is given a name composed of the letters A-Z and a-z and the digits 0-9 and starting with a letter. There is no limit on the length of a variable name and all characters are significant. Lower and upper case letters are distinct. .index range of a variable .p A variable is created by the first statement that references it and remains existent until the block in which it is defined terminates. The range of a variable extends to all blocks and subroutines within the defining block and this range may thus be regarded as 'global' within the block of definition. As the range of a variable extends to all nested blocks, subroutines have access to the full environment of their call site. This greatly simplifies argument transmission in many cases, but requires the writer of a subroutine to take care not to unintentionally modify external variables. .index LOCAL .index working variables The LOCAL declaration may be used to force the definition of a variable at a particular level and is typically used in subroutines to declare working variables. .index VAL .p Variable names have an important external significance in that a program running under CLONE may access a variable by name directly, avoiding the need for a reply statement. This facility is extremely useful for questions which are asked conditionally on some unknown factor and for reducing the number of explicit replies in very repetitive operations. This usage requires that the applications programmer include the variable name in the input call as described in the VAL documentation. .skip 6 .tp 6 .index variable types .index type declarations VARIABLE TYPES .p There are no type declarations in CLONE. Each variable may change its type as required by the context in which it is being used. However certain operations require arguments of a certain type and if an appropriate type conversion is not possible an error results. The following types occure within CLONE: .skip .lm +10 .i -10 .tp 4 .index string .index text string:### This is the basic data type in CLONE. All values are stored as strings until required in another form. In addition any other data type may be converted to a text string. String literals are any text enclosed in quotes (single or double) and not containing the type of quote used to delimit the string. Thus: .skip .lm +10 .nofill PRINT 'THE VALUE OF "A" WAS' .i -10 and PRINT "THE VALUE OF 'A' WAS" .skip .i -10 produce: THE VALUE OF "A" WAS and THE VALUE OF 'A' WAS respectively. .fill .p .index SUBSTITUTION The second example is interpreted differently if substitution mode has been enabled (see command ENABLE). In this mode the single quoted string 'A' is looked up as a CLONE variable and its value is inserted in the text string. .skip .lm -10 .tp 4 .i -10 .index integer .index decimal literals .index real literals .index overflow integer:## Numeric literals are stored as strings until required for arithmetic operations and are then converted to integers. Integer values must fall in the range -32768 to +32767, overflow generates an error message. Real decimal literals may be specified to CLONE. If used directly as a reply, they will retain their precision, However, if used in an operation within CLONE, they will be truncated to integers. .skip .tp 4 .i -10 .index logical .index yes .index no logical:## Logical values are either true or false. They generally result from comparison operations or from yes/no questions but may be included as literals in a macro as the string literals 'YES' and 'NO'. In fact any string other than YES is treated as false. When logical values are converted to strings they also take on these two text values. Numeric values may be converted to logical values and return true if they are not equal to zero and otherwise return false. .skip .lm -10 If any operation fails to convert its supplied arguments to the type required, a fatal error results and the macro terminates. .skip 6 .tp 6 .index operators CLONE OPERATORS .p The following is a list of the operators currently supported by CLONE and a description of their characteristics. .skip .lm +5 .tp 4 .i -5 .index addition .index string concatenation .index + +####Addition/string concatenation .br The plus operator attempts to convert its left operand to an integer. If this conversion is successful the addition is assumed to be arithmetic and the right operand must convert successfully to give a numeric result. If the left operand cannot be converted to an integer, both are converted to strings and concatenated. Thus: .skip .nofill 2+3 gives a result of 5 'HELLO'+3 gives a result of 'HELLO3' 2+'HELLO' gives an error .fill .skip The plus operator may also be used monadically. In this usage it has no effect other than to force its operand to a numeric internal representation. .skip .tp 4 .i -5 .index subtraction .index - -####Subtraction .br The minus operator requires two integer arguments and gives an integer result. When used monadically it changes the sign of its argument as in algebra. .skip .tp 4 .i -5 .index multiplication .index * .index division .index / *,/##Multiplication and division .br These operators require integer arguments and give an integer result. Note that for all arithemetic operators integer overflow and division by zero generate non-fatal errors. The result of an overflow is +/- 32767, the sign being determined by the sign of the overflowing value. Division by zero results in zero. .skip .tp 4 .i -5 .index string concatenation .index $+ string concatenation operator $+###String concatenation .br Both operands are converted to strings and concatenated. .skip .tp 4 .i -5 .index equality .index == equality operator ==###Equality .br This operator compares two operands and returns the logical result 'YES' if they are equal and 'NO' if they are not equal. If both arguments can be converted to integers the comparison is an integer comparison, otherwise logical arguments are compared for equality and string arguments are compared for identical text. In the case of string comparisons the left argument is given priority in that characters in the right argument after the end of the left argument are ignored. Thus: .skip .nofill .lm +5 'EQ'=='EQUAL' is TRUE 'EQUAL'=='EQ' is FALSE .skip .lm -5 .fill .tp 4 .i -5 .index inequality .index != inequality operator !=###Inequality .br As for equality except that result is TRUE if operands are not equal. .skip .tp 3 .i -5 .index string identity .index $= string identity operator $=###String identity .br This operator converts both its operands to strings and compares them for identity. .skip .tp 5 .lm -5 .nofill .index comparison operators .index < comparison operator .index <= comparison operator .index > comparison operator .index >= comparison operator < <= > .fill .lm +5 .i -5 >=###Comparison .br These operators are valid only between integer operands and perform conventional integer comparisons. .skip .tp 4 .i -5 .index logical operators .index _& logical AND _&####Logical AND .br Result is TRUE if both of the logical operands are TRUE. .skip .tp 4 .i -5 .index _^ logical OR _^####Logical OR .br Result is TRUE if either of the logical operands is TRUE .skip .tp 4 .i -5 .index ! logical NOT !####Logical NOT .br The following logical operand is complemented. .skip .lm -5 .skip 6 .tp 6 .index functions .index subroutines FUNCTIONS AND SUBROUTINES .p .tp 7 There are three classes of CLONE function .nofill .skip .index internal functions .index external functions .index local functions 1) Internal functions 2) External functions 3) Local functions .skip .fill .p .index $ sign Internal functions are built into CLONE to perform such operations as string processing which could not be written efficiently otherwise. Internal function names all start with the $ sign and continue with any upper case letters or digits. Most internal functions require an argument list of up to 16 values seperated by any seperator (including space) and entirely enclosed in parentheses. They return a single value and never modify their arguments. ex: .skip .nofill .lm +20 A='ABCDEFG' L=$LEN(A) .lm -20 .fill .skip In the above example A is assigned a string value then the $LEN function is used to obtain its length (7) and assign this value to L. .p The following internal functions are currently defined: .lm +5 .skip .i -5 .index $LEN $LEN(string) .br Returns the length of its argument when converted to a string .skip .i -5 .index $SEG $SEG(string,p1,p2) .br Returns the segment of its first argument converted to a string, between characters p1 and p2 inclusive. If p1 is null or less then 1 it is treated as 1 if p2 is null or greater than the string length it is treated as the string length. .skip .i -5 .index $LOC $LOC(string1,string2) .br Returns the character index at which the text string1 occures in string2 or zero if it does not occure. .skip .i -5 .index $DEF $DEF(name) .br Returns a logical value indicating whether or not the named variable is currently defined. This function is useful for detecting null arguments in CLONE functions. .skip .i -5 .index $NARG $NARG .br Returns the number of subroutine arguments passed in the call to the issuing routine. The result is a value between 0 and 16. .lm -5 .skip It is expected that this small set of internal functions will increase as the CLONE system is developed. .skip .p .index external functions External CLONE functions are contained in individual files either on the CLONE library device and directory ML:[100,100] or in a local directory. Those functions in the library UIC may be invoked via the CALL statement or simply by name. They are referanced by a global symbol table created when CLONE loads. Functions in a user directory are invoked by preceding the file name by the '@' character but are otherwise used as library functions. .p .index local functions .index SUBROUTINE Local CLONE functions are created via the SUBROUTINE statement. This declares a routine so that it may subsequently be called in the same manner as a library function. Once the SUBROUTINE statement has been executed the routine remains defined until the macro exits. This permits a definition file to be executed which declares a 'library' of user routines. .skip 2 Argument lists .p .index argument lists Argument list syntax for all of the above call types is the same. An argument list (if supplied) must follow the call with no intervening seperators and must be entirely enclosed in parentheses. ex: .skip .i +20 CALL PROC(A,B,C,D) .skip The arguments may be any valid CLONE expressions including function calls and valued blocks. An argument list may continue over several lines provided that each line to be continued terminates with a seperator (other than newline). Individual arguments may be made null with two adjacent seperators ex: .skip .index null arguments .i +20 CALL PROC(1,2,,D) .skip Null arguments are passed to the routine called as undefined variables. The maximum number of arguments in any call is 16. .pg .subtitle ###############Command syntax .figure 3 .index command syntax .center CLONE COMMAND SYNTAX .skip 3 .p This section describes the use of the various CLONE commands. The same text comprises the major part of the macro HELP.CL1 which provides an interactive help facility. .p .index keywords .index lower case .index upper case The following command names are all reserved keywords. That is they must not be used as names of variables or of macros. These names are all defined in the CLONE permanent name table in CL1SYN.MAC. Command names are only recognised in upper case. Though it is not generaly recommended, the same names in lower case may be used for variables. .skip .nofill .skip 2 .tp 21 CLONE command keywords are: .skip ARGUMENTS ASK or ASKN BEGIN or ( BREAK CALL or macro name alone @file name DO ENABLE, DISABLE END or ) FOR GET or [expression] IF q THEN s1 ELSE s2 LITERAL, CLONE LOCAL LOG, NOLOG LOOP or NEXT MCR PASS n or @ n PRINT REPEAT REPLY RESUME RETURN RUN STACK STOP SUBROUTINE SUSPEND SYS TEXT, NOTEXT TRACE, NOTRACE UNLESS q THEN s1 ELSE s2 UPDATE .fill .skip 6 .tp 6 .index ARGUMENTS ARGUMENTS: .p The ARGUMENTS command declares an argument list in a subroutine. .skip .i +20 ARGUMENTS A,B,C,D,E,F,G .skip defines the named variables locally and associates them with the actual values passed when the routine is called. The actual argument in the call may be: a literal, a variable or null. In this last case the local variable is created undefined and this state may be detected with the $DEF function. .p Normally the ARGUMENTS statement will be executed once as the first statement of a routine. However it may be used repeatedly to obtain succesive arguments in functions with variable numbers of arguments. In this case the $NARG function may be used to determine the total number. .skip 6 .tp 6 .index ASK .index ASKN ASK and ASKN: .skip The ASK statement asks a question at the terminal and returns the result to a CLONE macro. The resulting value may be used for computation within the macro or may be REPLIED to a program. .skip A=ASK 'prompt string' .p The value assigned to A is a text string read to end of line. The ASK command does not perform any checking or type conversion. .p To input a numeric value use ASKN .skip I=ASKN 'PLANE NUMBER ? ' .skip In this case the value must be an integer numeric value. .p For either input request the prompt may be an expression enabling the prompt string to be composed at run-time. REQUEST is provided as a synonym of ASK. .skip 6 .tp 6 .index BEGIN .index ( BEGIN OR (: .p Define the beginning of a BLOCK. All statements upto END or ) compose a single compound statement. Blocks Are generally VOID but may be VALUED. A VOID block has no value itself and any statement which has value within a void block (the literal 5 for instance) is treated as a REPLY statement. .p A NON-VOID block is created by using a block within an expression: .skip A=(.........) .skip This form is well known in arithmetic expressions. However, such a NON-VOID block may contain multiple statements one of which must be the block value. .skip A=(B=6 2*B) .p There are no constraints on the position of the valued statement but there must only be one such within a VALUED block. .skip 6 .tp 6 .index BREAK BREAK: .p Within any loop construction BREAK causes an immediate exit from the loop. Execution continues at the statement immediately following the loop clause. .skip A=1 REPEAT (PRINT A IF A>100 BREAK ELSE A=A+1) .skip 6 .tp 6 .index CALL CALL: .p Call a named macro. The word CALL is optional, a macro name itself being a valid CLONE statement. .skip CALL HELP is the same as HELP .skip CALLable macros are those files on ML:[100,100] having extension .CL1 and a file name beginning with a letter and those local routins which have been declared with the SUBROUTINE statement. .p Implicitly CALLed macros may be used as functions if called in valued context. .skip V=FMUL(A,3.14159) .skip would evaluate the macro FMUL as valued and return its result to V. Both implicit and explicit calls may take an argument list. .skip 6 .tp 6 .index @ @: .p This command is similar to CALL except that the macro invoked may be in any file. The @ must be immediately followed by an RSX file specification. .skip @DK1:MYMACRO .skip The default device is SY: and the default UIC is that of the calling terminal. If the extension is not specified the file is first looked up as .CL1 and if this fails .CMD is tried. The file extension determines the mode in which the macro is initially executed. If the extension is .CL1, initial execution is in CLONE mode (see command CLONE), otherwise the initial execution mode is LITERAL (see command LITERAL). If the lookup for the file fails, the system macro table is searched for the name. This avoids users needing to know where macro files are and enables local re-definition of system macros when these are called via @. See command PASS and SUSPEND for additional uses of the command @. .p Routines called with the @ command may be used exactly as those invoked by the implicit CALL command ex: .skip .i +20 V=@DK1:CALC(A,B,C) .skip .skip 6 .tp 6 .index DO DO: .skip This is a standard loop clause with a numeric control variable. The basic form is: .skip DO i=e1,e2,e3 statement .skip The statement is executed for values of the loop variable i in increments of e3 between e1 and e2. If e3 is omitted an increment of +1 is assumed. Unlike the FORTRAN DO loop; if e2 is initially less than e1 and if e3 is positive, the loop is never executed. Similarly, if e1 is initially less than e2 and if e3 is negative. the loop is never executed. If e3 is zero the loop is infinite. The statements BREAK and NEXT may be used within a DO loop to transfer control out of the loop or back to the top respectively. .skip DO I=1,10 PRINT I,I*I .skip 6 .tp 6 .index ENABLE .index DISABLE ENABLE and DISABLE: .p These two commands are used to turn on and off certain CLONE functions. Each can take any of the keywords listed below as an argument. .skip ENABLE SUBSTITUTION .skip In some cases there are short forms of the ENABLE/DISABLE commands which use the same keywords. In general however the keywords here are local to the ENABLE/DISABLE commands. The following keywords are legal ENABLE/DISABLE arguments: .skip .index keywords .index LOG .index TRACE .index TEXT .index LITERAL .index SUBSTITUTION .nofill LOG See command LOG TRACE See command TRACE TEXT See command TEXT LITERAL See command LITERAL .br .fill .lm +24 .i -16 SUBSTITUTION####Controls replacement of a CLONE variable name enclosed in single quotes within string literals and LITERAL mode lines by the current value of the variable. .skip .nofill A=3 PRINT "THE VALUE OF A IS 'A'" gives: THE VALUE OF A IS 3 .fill .skip .lm -24 .skip 6 .tp 6 .index END .index ( .index lexical level END OR (: .p END is not an executable statement. It is the BLOCK terminator and must occur at the same LEXICAL LEVEL as the BEGIN which it matches. END may thus not be the subject of any clause. .skip 6 .tp 6 .index FOR FOR: .p The FOR loop provides a general loop in which the loop variable is assigned each of a set of values in sequence. .skip FOR a=e1,e2,e3...en statement .skip The statement is executed once with each value e1 to en in turn assigned to a. The values in the list may be of any type and if they are expressions are evaluated immediately prior to their assignment to the loop variable. A typical use of the FOR loop would be execution of a program with a set of file names. .skip .nofill FOR NAME='FRED','JIM','MARY','JOANN','PETER' RUN PROC ( 100 100 'ADD' NAME 1 1 '') .fill .skip 6 .tp 6 .index GET GET: .skip GET returns a value that has been previously RECORDED by a task running under CLONE. If no value is available the issuing macro suspends until a RECORD is issued. Note that the use of GET assumes that the programmer has provided appropriate calls in the application program. .skip RUN FRED (X Y Z A=GET) PRINT A .skip A compound form is available which REPLYs a value to the program and GETs a result. This form is useful with certain specially written utility programs. .skip .nf REPLY X A=GET can be replaced by: A=[X] .fill .skip 6 .tp 6 .index IF .index THEN .index ELSE .index dangling ELSE IF: .skip The IF clause has three forms: .skip .nofill 1) IF q THEN s1 ELSE s2 2) IF q THEN s1 3) IF q C [ELSE s] .fill .p The first form is fully general. q is any expression which can be converted to yield a logical result (yes/no or true/false). s1 and s2 are any CLONE statements and will frequently be BLOCKS. .p In the second case the ELSE clause has been omitted. The resolution of a 'dangling else' in nested IF clauses is performed by binding each ELSE to the nearest 'un-elsed' IF. .p In the third case the THEN is omitted. This is permitted when the statement c is a CLONE command name. .skip IF q BREAK is valid, but IF q A=3 is not. .skip As indicated the ELSE is optional in this case too. The IF statement may return a value. .skip A=IF q THEN 3 ELSE 4 .skip where the 3 and the 4 could be any expressions. .skip 6 .tp 6 .index LITERAL .index CLONE LITERAL and CLONE: .skip LITERAL mode enables CLONE to process indirect files in much the same way as RSX MCR commands whilst still taking advantage of CLONE features. The statements LITERAL and CLONE enable and disable LITERAL mode, respectively. In LITERAL mode command lines are not parsed by the CLONE syntax processor unless their first character is one of the special characters described below. Lines of text are transformed into literal text replies as though they were entirely enclosed in quotes. .p Two special characters provide escapes from LITERAL mode: . and @. If a command line begins with . then the line is parsed as a normal CLONE line excluding the '.'. If a line begins with @ the line is parsed as described elsewhere for the command @. .p To exit from literal mode the command CLONE must occur on a line beginning with '.'. .skip .tp 6 .nofill LITERAL THIS LINE IS REPLIED AS TEXT .A _# REPLY THE VALUE OF A @XXYY _# CALL AN INDIRECT FILE THIS IS ANOTHER TEXT REPLY _# THIS IS A COMMENT .CLONE _# RETURN TO CLONE MODE .fill .skip In literal mode the comment character _# must be the first character on the line, otherwise it will be returned as a reply. .p If SUBSTITUTION mode is ENABLEd then the value of a CLONE variable may be substituted into a LITERAL mode line by inserting the variable name enclosed in single quotes at the appropriate point in the line. Thus if the value of FILE is 'MYDATA' the LITERAL mode line: .skip .nofill PIP DK2:'FILE'.DAT;*/DE will be replied as: PIP DK2:MYDATA.DAT;*/DE .fill .skip 6 .tp 10 .index LOCAL LOCAL: .p This command declares one or more variables locally. The form is: .skip .nofill LOCAL I,J,K or LOCAL I=1,J=2,K=3 .fill .skip The specified variables are defined at the level of the block in which the statement occurs, even if a variable of that name already exists in an outer block. On exit from the block the new variable is deleted leaving the previous one unchanged. .skip 6 .tp 6 .index LOG .index NOLOG LOG and NOLOG: .p LOG enables listing of all transactions between programs and macros and between macros and macros. In general if LOG is enabled questions and answers will appear on the terminal as though they were being typed. However other operations such as CALLs RETURNs and RECORDs are also logged. .p The command NOLOG disables LOG mode. .skip 6 .tp 6 .index LOOP .index NEXT LOOP: .p LOOP like BREAK is used within a LOOP clause to cause an immediate return to the top of the loop. It may be described more exactly as a jump to the point immediately after the last statement of the loop. This view clarifies the behaviour in DO loops. NEXT is a synonym for LOOP. .skip 6 .tp 6 .index MCR MCR: .p This command provides a simple means for CLONE to issue MCR commands to RSX. The form of the command is: .skip MCR statement .skip where statement may be a single REPLY or may be a BLOCK providing many REPLYs. Within an MCR block all REPLYs which would otherwise be sent to a program are issued as MCR commands. .skip MCR DO I=1,10 "PIP FILE'I'.DAT;*/DE" .skip which will issue the PIP command for FILE1, FILE2... if SUBSTITUTION mode is ENABLEd. .skip 6 .tp 6 .index PASS .index @ PASS n or @ n: .skip The PASS command causes CLONE to pass the next n questions posed by the task under CLONE control directly to the console. This avoids unnecessary questions and REPLYs within CLONE macros. n may be a numeric CLONE expression. .br In the special case where n is omitted the command acts as SUSPEND. .skip 6 .tp 8 .index PRINT PRINT: .p PRINT outputs text and CLONE values to the terminal (TI:). Each PRINT statement outputs on a new line but a single statement may output any number of values. .skip PRINT I,J,K .skip Value separators may be ',' ';' or ':' to separate the text with tab, space or nothing, respectively. .skip PRINT 'I=':I,'J=':J .skip A PRINT statement without arguments produces a blank line. .skip 6 .tp 6 .index REPEAT REPEAT: .skip The REPEAT clause is the simplest type of loop. The statement following the command is executed repetitivly until one of: STOP, RETURN or BREAK is executed. .skip .i +20 A=1 REPEAT IF A>100 BREAK ELSE (PRINT A A=A+1) .skip 6 .tp 6 .index REPLY REPLY: .p The REPLY statement is the principle statement of the command language. The statement: .skip REPLY e .skip Causes the value of the expression e to be passed to a program running under CLONE control as though it had been typed at a terminal. The word REPLY is optional and any expression occurring in a context where no value is required is interpreted as a reply. .p The REPLY statement usually occurs within a RUN-BLOCK .skip RUN FRED (1 2 3 4) .skip This causes the program FRED to RUN and REPLIES the values 1,2,3,4 to its first four questions. If the program exits before all the replies have been accepted the remainder is ignored. .skip 6 .tp 6 .index RESUME RESUME: .p The RESUME command is used to resume a macro which has suspended. As the macro is not executing RESUME must be issued from a BREAKIN command. If a program is running and posing questions, typing the ESCAPE key to any question will resume the suspended macro, otherwise if no question is posed the CL1 MCR command must be used to breakin to the suspended macro. When CLONE prompts (CL1>) a reply of RESUME or CTRL-Z will resume the macro. .skip 6 .tp 6 .index RETURN RETURN: .skip The RETURN command instructs the CLONE processor to return to the macro routine being processed before the last CALL or @file statement. If the current routine was not CALLed RETURN is equivalent to STOP. An implicit RETURN is executed when an end-of-macro-file is reached. .skip 6 .tp 6 .index RUN RUN: .p RUN causes a named program to execute and may supply it with data in the form of REPLIES. The basic form of RUN is: .skip RUN PROG s .skip where PROG is the name of an installed task and s is a possibly null CLONE statement. s will generally be a BLOCK containing REPLYs and data computations and in this case s is refered to as a RUN-BLOCK. .skip RUN FRED (A=2 A*3 A*4) .skip Here a variable is initialized and used in the computation of two REPLYs to program FRED. .p CLONE control does not continue past the end of the RUN-BLOCK, until the program exits. Thus any further questions are posed directly to the console. Conversely if the program exits before the end of the RUN-BLOCK, computations within the block take place but all REPLYs are null. If a run block is supplied and contains replies then the task must perform input using the VAL utilities. However any other task may be executed via the RUN statement and will pose questions directly to the terminal. If the task named is already active the macro will pause until it terminates. .skip 6 .tp 6 .index STACK STACK: .p The STACK command is an information command which displays the values of all variables defined at each lexical level. The current type of each variable is indicated by enclosing strings in quotation marks, printing numbers directly and printing logical values as YES or NO. Parameters passed by name to subroutines are preceded by the symbol '@'. .skip 6 .tp 6 .index STOP STOP: .p The STOP command terminates execution of the issuing macro. If a program is being run all its remaining questions are posed directly to the console. .skip 6 .tp 6 .index SUBROUTINE SUBROUTINE: .p The SUBROUTINE statement defines a routine which is then available as a local function for the duration of the execution of the macro. Functions so defined remain available even when the defining block has been left. .skip .nofill .lm +20 .tp 6 SUBROUTINE name ( ARGUMENTS A,B,C,D routine body ) .skip .lm -20 .fill The arguments statement is of course required only if the routine expects to be passed arguments. The parentheses are required even when the routine body is a single statement, an implicit RETURN is executed at the closing parenthesis. However an explicit RETURN may be used anywhere within the routine body. .skip 6 .tp 6 .index SUSPEND .index @ SUSPEND or @: .p The SUSPEND command causes execution of the issuing macro to suspend until a RESUME command is given. Questions posed by the program until the RESUME is issued are passed directly to the console. SUSPEND provides a mechanism for inputting data of indeterminate length and for suspending operations after some error condition while corrections are made. The command may be issued by an executing macro or as a breakin command. Note that if the @ form is used it must be the last command on the line to avoid confusion with the @ n construction. .skip 6 .tp 6 .index SYS SYS: .p SYS is an information command which provides information on all CLONE processes and streams active. The command prints for each active terminal the list of active macros and tasks. In addition status and flag values are printed for each process and stream. Consult CLONE system documentation for interpretation of these flags. .skip 6 .tp 6 .index TEXT .index NOTEXT TEXT and NOTEXT: .p The TEXT and NOTEXT commands respectively enable and disable text mode. In text mode all REPLYs are printed on the terminal rather than being sent to a task. This is useful for outputting large quantities of information. TEXT is most useful in conjunction with LITERAL mode. .skip 6 .tp 6 .index TRACE .index NOTRACE TRACE and NOTRACE: .p The TRACE and NOTRACE commands respectively enable and disable tracing of CLONE command lines as they are executed. When tracing is enabled each line is printed as it is executed. Lines beginning in false conditional context are not printed. .skip 6 .tp 6 .index UNLESS UNLESS: .p The UNLESS command syntax is identical to that of IF. However the condition for execution of the THEN clause is the compliment of the logical expression. .skip .nofill UNLESS c PRINT x is the same as: IF !c PRINT x .fill .skip 6 .tp 6 .index UPDATE UPDATE: .p The UPDATE command must be used if a CLONE system macro, that is a macro file on ML:[100,100], is modified and is to be called without restarting CLONE. This may often be the case in a multi-user environment. The UPDATE command associates any new versions of macro files with their names in the system macro table. If CLONE exits before the new macro is called, UPDATE is not required as the new version will be found in CLONE initialization. .pg .subtitle ###############Console commands .figure 3 .index CONSOLE COMMANDS .center CONSOLE COMMANDS .skip 3 .p CLONE macros are generally invoked by typing @filename to a question posed by a program or another macro. The filename can be any RSX file specification (see command @) indicating the macro to be executed. .p .index immediate mode To issue any CLONE command type the command followed by the escape key, this creates an immediate mode macro. If the command is null CLONE prompts CL1> for a command. .p .index CL1 MCR command ESCAPE has special significance when typed to a question posed by a CLONE macro. In this case it generates a breakin of the the macro execution and permits examination and modification of macro variables. Breakin mode is terminated by CTRL-Z. When no question is posed (as in an infinatly looping macro) a breakin may be created with the CL1 MCR command. .nofill .tp 10 .skip 2 Summary: @name execute macro file named. @ connect to CLONE (immediate mode). If CLONE is not active connect (immediate mode). If CLONE is active breakin current macro. If CLONE is suspended RESUME command If CLONE is not active, connect and execute. If CLONE is active, breakin and execute. If CLONE is suspended, breakin and RESUME on termination of command. .fill .pg .subtitle ###############Error messages .figure 3 .index error messages .center CLONE ERROR MESSAGES .skip 3 .p The following messages are output when an error occurs during the processing of a CLONE macro. In all cases the error causes execution of the macro to stop and any program under control continues comunicating directly with the console. The error processor prints the line in which the error was detected with an arrow indicating a point immediately after the error. .skip 2 .tp 6 .lm +5 .i -5 MISSING QUOTE .br A quote (' or ") occurred without a matching quote on the same line. This is a syntax error. .skip .tp 6 .i -5 ILLEGAL DECIMAL POINT .br In CLONE mode a decimal point is valid only as part of a numeric value. No other usage except within a quoted string is permitted. .skip .tp 6 .i -5 ILLEGAL SYMBOL .br A character was used outside a quoted string which was not one of: .br A-Z a-z 0-9 . _# _& _^ ! < > = + - / * ( ) [ ] @ SPACE or TAB. .skip .tp 6 .i -5 SYNTAX ERROR .br Many errors fall into this catagory. In general these are incorrect usages of CLONE statements. .skip .tp 6 .i -5 ILLEGAL TYPE CONVERSION .br An operation required arguments of a type which could not be obtained from the argument type supplied. For example the string 'ABCD' cannot be converted to a number. .skip .i -5 UNDEFINED VARIABLE .br A variable name was used as the source of a value before it was defined. The first use of a variable must always be as the lefthand side of an assignment statement. .skip .tp 6 .i -5 ILLEGAL END .br An END statement was given at a point where the end of a block is illegal. This is either where the context requires a value or in a subroutine after all the BEGINS have already been matched. Remember that BEGIN and END are equivalent to ( and ). .skip .tp 6 .i -5 VOID BLOCK IN VALUED CONTEXT .br A block was specified in a valued context nut no value was returned. An example of such an error is: A=(B=3 C=4 REPLY B*C) .skip .tp 6 .i -5 ILLEGAL BOOLEAN EXPRESSION .br A statement which requires a logical argument, such as IF, was used with an argument which could not be interpreted as a logical (boolean). .skip .tp 6 .i -5 ILLEGAL THEN .br A THEN was used outside the context of an IF statement. .skip .tp 6 .i -5 ILLEGAL ELSE .br An ELSE was used outside the context of an IF statement. .skip .tp 6 .i -5 ILLEGAL MACRO NAME IN CALL .br The name specified in an explicit CALL statement was not found in the CLONE table of macros. If this is not a typing error the UPDATE command may be required. .skip .tp 6 .i -5 ERROR ON MACRO INPUT FILE .br An FCS input error occurred whilst a macro file was being read. Try listing the file with the LIST macro (which uses PIP). .skip .tp 6 .i -5 STACK OVERFLOW .br Each BEGIN or CALL requires a certain amount of CLONE stack space. The quantity of stack available is limited and this error indicates that it has been exhausted. Try to reduce the number of parentheses and nested statements. If this is not possible your macro is too complex for the current version of CLONE to handle. In this event please inform systems management personnel. The stack size may be increased by editing the CLONE options command file and re-taskbuilding CLONE. .skip .tp 6 .i -5 RUN FAILED: NOT INSTALLED, OR BAD NAME .br In a run statement the task name specified did not correspond to the name of an installed RSX task. If this is not a typing error install the task with MCR either within the macro or before calling it. .skip .tp 6 .i -5 GET ISSUED BY BOTTOM STREAM .br A GET statement was issued by a macro which was not controlling a task. This is either a programming error or the correct sequence of operations has not been followed for the specific macro. .skip .tp 6 .i -5 ILLEGAL INTEGER VALUE .br A value in an expression required to be integer (ex. a DO limit) was not an integer value. .skip .tp 6 .i -5 MACRO FILE NOT FOUND .br A file specified in an @ command does not exist. .skip .tp 6 .i -5 BAD MACRO FILE NAME SPECIFICATION .br A file name specified in an @ command was not a legal RSX file specification or did not terminate with space or end-of-line. .skip .tp 6 .i -5 UNEXPECTED END OF MACRO FILE .br End-of-file occurred in a macro whilst expression operands were required. .skip .tp 6 .i -5 BAD STRING SUBSTITUTION SYNTAX .br SUBSTITUTION mode is enabled and an unmatched quote or zero length substitution string occured in a string literal or in a LITERAL mode line. .skip .tp 6 .i -5 DYNAMIC MEMORY EXHAUSTED .index workspace .index dynamic memory .br CLONE has run out of internal buffer space. This may be due to the creation of very large numbers of variables, very long string variables, or to simultanious use by too many users. CLONE may by installed with a larger workspace using the MCR INS command with the INC option. Also the initial workspace size is set in the TKB options file. The SYS and STACK commands print available workspace and may be used to determine reasonable maximum requirements. The maximum total workspace size is 12K words. .skip .tp 6 .i -5 BAD ARGUMENT LIST SYNTAX .br A syntax error was detected in parsing a subroutine argument list. .skip .tp 6 .i -5 UNRECOGNIZED INTERNAL FUNCTION NAME .br An internal function name ($name) was used which was not recognized by the CLONE system. The $ sign may only occure in an internal function name. .skip .tp 6 .i -5 BAD INTERNAL FUNCTION ARGUMENTS .br An internal function was called with arguments which were incompatible in type or number with the requirements of the function. .skip .tp 6 .i -5 TOO MANY FUNCTION ARGUMENTS .br The maximum number of arguments which may be passed in a subroutine or function call is 16. .skip .tp 6 .i -5 RSX SYSTEM ERROR -n .br An error occurred in an operation performed by an RSX utility which was not diagnosed more precisely by CLONE. The error code printed should be looked up in RSX documentation. .br .lm -5 .pg .subtitle ###############Implementation .figure 3 .index implementation .center CLONE IMPLEMENTATION .skip 3 .p This section describes the overall structure of the CLONE system as implemented under RSX-11M. The current version (V003) requires at least RSX-11M V3.2 .p CLONE is a privileged RSX-11M task. It receives messages from applications tasks demanding particular functions and, when ready, gives a reply enabling the task to continue. CLONE can process operations for any number of terminals simultaineously and thus is fully multi-user. In addition all questions posed by CLONE may themselves be answered by a CLONE macro. .p The principal method of communication between CLONE and a task under its control is via a dynamically created region in the partition VALPAR. This common may be created by CLONE (in the RUN command) or by the task (during a call to START after an MCR RUN command). In the former case this region is named CL1Rxx, where xx is the terminal unit number, and in the latter case VALRxx. The information contained in this region is outlined in the VAL document and is defined in detail in the file VALMFD.MAC . .p At any one time the shared region is either under the control of a task or of CLONE, the syncronization is performed by messages sent by the task to CLONE and by a task local event flag which may be set by CLONE. .p A task running under CLONE will normally never perform terminal input; rather, all input requests will be processed by CLONE and the data transferred back into the shared region. CLONE is thus free to decide how questions are to be answered and what prompt is to be posed as the prompt itself is stored in the shared region. When a reply to a question causes an error, as when the value entered is out of range, the question is re-posed to CLONE in a special mode in which no symbol table lookups occur and the question is forced directly to the console. This permits program level checking of values requested by CLONE. .skip 4 .index internal structures CLONE INTERNAL STRUCTURES .p .tp 7 All workspace within CLONE is occupied by items having the following format: .skip .nofill word 1 its own address (this is a check word) word 2 length of packet in words for those items forming lists: word 4 address of next item (0 at end) word 5 address of previous item .fill .skip A list has an associated LISTHEAD, a two-word block pointing to the first and last items of the list. A null list has a zero in the first word of the listhead. .p .index process list .index TI: Each terminal which is running a CLONE macro has an entry in the PROCESS LIST. A proccess is closely linked with the idea of a TI: in RSX. Specifically the process list item stores the LUN assigned for terminal I/O and other terminal-dependant information. .p .index stream list In each process list item is a listhead for the process's STREAM LIST. The stream list is an ordered list of active tasks and macros associated with the process, the higher items controlling the lower. There may be any number of CLONE stream items controlling any number of task streams started by nested RUN commands. .p Stream list items are of two distinct types: CLONE streams and TASK streams. The former relate to executing macros whilst the latter contain information concerning tasks active under CLONE. The SYS command will list the process and stream lists. .p .index control descriptor The execution of a CLONE stream is controlled by a CONTROL DESCRIPTOR. This item stores the precise location of the execution pointer in the macro file (or terminal buffer) containing the macro source. The descriptors may be linked in a list to implement CALL and copied and saved in order to save a position in a program and return to it as is required in a LOOP. .p The routines which create and manipulate these basic lists are contained in the main module CLONE.MAC. In addition the following modules provide other facilities. .skip 2 .lm +10 .i -10 CLONE .br This module contains data-structure definitions, routines for performing all the basic language functions and the entry point and control routine. .skip .i -10 CL1LEX .br This module is the lexical analyzer. It determines the basic symbols in the input stream and looks them up in the symbol tables when appropriate. .skip .i -10 CL1SYN .br This is the parser itself and contains almost all the definition of the language syntax. The main entry is VALEXP which evaluates expressions recursively using operator precedence for the standard operators and individual parsing routines for the more complex forms. The entry to VALEXP causes a software interrupt to permit switching between CLONE streams and the recognition of 'breakin' commands. .skip .i -10 CL1COM .br This module contains the principal routines concerned with communication between tasks. It contains most of the RSX-11M directives which are issued by CLONE. .skip .i -10 CL1QIO .br In order to free CLONE from the constraints imposed on tasks with I/O in progress, all terminal input is performed by the external task CL1... This module provides the interface to that task. It sends prompt messages and receives the replies at input completion. .skip .i -10 CL1VAL .br This module is assembled with the VAL prefix file [2,1]VALMFD.MAC which contains all the VALCOM offsets. This module may be regarded as an interpreter for a task stream as it is invoked in the same way as VALEXP but responds to requests issued by a task executing under CLONE. .skip .i -10 CL1FIL .br The interface to the RSX files system is contained in this module. The main functions are 1) lookup of all the macro files defined under ML:[100,100] and 2) input of lines from a file. The system can access any number of macro files using a small number of FDBs by saving and restoring status information between stream switches and re-opening files by file ID for speed. .skip .i -10 CL1SUB .br Various subroutines used by the system such as type conversion and error reporting are contained in this module. .skip .i -10 RSXSUB .br This module accesses RSX data structures directly. It should be the only module in CLONE that requires EXEC mapping in order to permit the re-use of the EXEC APRs. .skip .i -10 CL1DYN .br Dynamic memory allocation. The dynamic memory pool is physically located in the space between the end of CLONE code and the end of the task image. This region is extended at task initialization time by an EXTSK directive to increase the pool size by an increment set in the TKB command file. In addition CLONE may be installed with an INC parameter to increase pool space still further up to a total of 12K. APRs 1,2 and 3 are used for the mapping of the task extension which thus shares virtual address space with the executive. RSXSUB re-maps these APRs before accessing the executive. .skip 2 The remaining modules are overlay segments of the same region. They perform linear operations which cannot be interrupted by CLONE context switches. .skip .i -10 FILOVL .br This module performs file-name parsing and lookups. It also creates the system macro table. .skip .i -10 FUNOVL .br This module is the internal function processor, it contains the main code for all the $name functions. .skip .i -10 RUNOVL .br This module creates the VALRnn region for a task and requests it for execution. .skip .i -10 ERROVL .br This module reports errors and prints the current line and address in the calling code. .skip .i -10 SYSOVL .br This module contains code to print system status information for the STACK and SYS commands. .skip .i -10 LOGOVL .br This module contains routines to print transactions on the terminal when LOG mode is enabled. The overlay routines are interfaced via a set of entry points in CL1FUN which use a common test for LOG enable. .skip .i -10 CL1MAC .br This file is a prefix file to be included in the MAC command line for each of the above modules when it is assembled. It contains definitions of assembly code macros. .skip 2 CLONE uses two external tasks. the MCR command CL1 and the input processor CL1... . .skip 2 .i -10 CL1 .br This is the source module of the MCR command task ...CL1. The only function of this task is to transmit its command line to CLONE, prefixed with the the issueing TI:. .skip .tp 6 .i -10 CL1IN .br This is the source module of the terminal input task CL1... it receives message packets containing a terminal and a prompt message, issues a read-with-prompt QIO and returns a message when the input is complete. Once activated, CL1... remains active and thus should idealy be fixed or installed in its own partition. It will genarally be most conveniant to install it in VALPAR which is reserved for CLONE and VAL dynamic regions. .lm -10 .skip 2 .p The sources themselves contain detailed comments on the function of the individual routines and CLONE.MAP may be consulted for the full cross-reference map of the program. .pg .subtitle ###############INDEX .figure 3 .center INDEX .skip 2 (CLONE commands appear in UPPER CASE) .skip .print index .; end of clone users guide NOVEMBER 1981