Home

O - Defense Technical Information Center

image

Contents

1. y doip 941191115 YIM eunjongjs ejep ju iino y ooe daoi y Jopun eJnjonijs ejep y 9APS S9o dtu3 JO 9401s 0 eui 10 ppe SILON tese wa gt r lt oou o m m un er mme i mom qquaowaye1s gt Op lt 3511 gt Wuoe9J0j 1e Aulo p lt 2 gt lt gt 1dx9 gt f lt IeAWa T gt lt 1dxo gt gt Ulpe ool cJPAUIS D Ul91LM9U f QINJOMIJSURBTO oinjonmsebiaw lt ARPLIe gt 91032104315 dorp oInjonJiispPeol 9140120435214 OSPIS c 1dxoe uoj s u1dxo gt 1dxo gt 19s gt lt 3 gt 9AOUIOJ 19s gt udxo gt Jdxo gt lt 9 2 gt idxo wajt gt A119doud ubtsse SENANIIVIS 88 NOTES 1 Items properties and locals be declared only at the beginning of a LEAP program 2 The word uselcap must follow start in every LEAP program in which the associative sublanguage is used 3 When a procedure is declared one can specify either an item or an itemvar
2. 2 3 aKNOB4 13 awEIR T rs s 17 aNUMSTROKES TABLE III B INPUT DEVICE NAMES AND THEIR OCTAL CODES AND RESERVED VARIABLES AUTOMATICALLY REPORTED REPORT SPECIFICATIONS BKNOBS BEIR gRTC TBLTPOS TABLE III C REPORT SPECIFICATIONS NOTES causes yKNOBI thru yKNOB4 to be set causes yEIR to be set up causes to be set up causes y TBLTX and TBLTY to be set up 35 RESERVED VARIABLES DATA TYPE oKNOBI FIXED aKNOB2 aKNOB3 H aKNOB4 oTBLTX E EIR INTEGER RTC E oITEMSEEN c CAUSE aGRPSEEN aNUMSTROKES TABLE III D RESERVED VARIABLES FOR THE INTERACTIVE INPUT SUBLANGUAGE FUNCTION AND PARAMETERS DATA TYPE NOTES NUMPOINTS lt stroke number gt INTEGER value is the number of ink points in the indicated stroke INKX stroke number point number X and Y coordinates of the FIXED indicated ink point INKY stroke number lt point number TABLE III E RESERVED FUNCTIONS WHICH ARE RELATED TO THE INKING EVENT 36 PROCEDURE NAME CLEARINK no parameters TURNOFFINTS no parameters CLEARINTS no parameters SETPENMODE display group gt pen mode 0 1 2 or 3 gt GETNEXTINT no parameters NOTES This causes the ink to be removed from the display and the inking machinery to be re armed Turn off all interrupt devices Clear out the list of input events See Note 5 below The GETNEXTINT reserv
3. REPORT TITLE The LEAP User s Manual 4 DESCRIPTIVE NOTES Typa of report and inclusive datas Lincoln Manual AUTHORIS Last name first name initiai Rovner Paul D 6 REPORT DATE 7a TOTAL NO OF PAGES 7b NO OF REFS 11 September 1970 100 12 9 ORIGINATOR S REPORT NUMBER S 8 CONTRACT OR GRANT AF 19 628 5167 Manita b PROJECT NO ARPA Order 691 9b OTHER REPORT NO S Any other numbers that be assigned th s report ESD TR 70 256 AVAILABILITY LIMITATION NOTICES This document has been approved for public release and sale its distribution is unlimited 11 SUPPLEMENTARY NOTES 12 SPONSORING MILITARY ACTIVITY None Advanced Research Projects Agency Department of Defense 13 ABSTRACT This document is a user s manual for the LEAP language LEAP is an extended algebraic programming language which is similar in form to ALGOL 8 Extensions include language forms for display output and interactive input and facilities for building and manipulating associative information structures The basic algebraic language is described in Sections I through IX the extensions to LEAP are presented in the Appendices 14 KEY WORDS computer language LEAP language extended algebraic language UNCLASSIFIED Security Classification
4. 395 J46 5 owes So drg1 9STMIO9Uu10 19S SALON NVTIOOGH NVTIOOd NViIOOd NV TIOOd NVITOOU 94 Jo d41 x lt 1 1 gt 1010011561 Idxo 1998 gt JdXo 198 Jdxe 198 Idxe S Jdxe gt gt lt w gt Jdxe w y gt Jdxe UI 1I gt lt Idxe 1 lt Ayiedolids ST lt gt NL es 1 gt 1dxe w gt Jdxe gt IdII1ST Idxo 198 IdXoe gt 31 IdXe 198 Jdxoe gt I 14 1 Jod SNOISSdHdX3 DTI 4 lt deq gt 1edpie Sd eq 1dx 31 gt udxe gt deq qeoo gt lt gt deq 1dxo uet 1dxo gt lt gt lt 1 195 gt lt eo gt lt uedpie gt udxo gt lt idx gt lt gt idxo gt qpue lt gt pie pue lt 1 gt pie 39 gt IPAWO YI QU 19S uy su t 1I y JO euo ubIsse MoU p ainjonijys eiep HulyIOM y 921 0111 1 91 o1njongs ejep _ ju9lIno y eJnjonuis pejeorpur y puedde o1njonujs
5. CS D a N e NW Z UN IN UN IW CIN IN 3593 Ajr enbeug 3593 XTHIVIA uonoenqns uontppe XTHLV N 1 Aq 1e eos jueujurio1op suuin oo jo SMOI JO 1u5r1 0 urofpe MO eq ufofpe uopneor dr nur uomneor dri nu 1ie eos asodsuen ONINVAIA StuOJVH3dO XIULVW SYUOLVYddO 12 D MISCELLANEOUS MATRIX EXPRESSIONS FORM MEANING AE1 AE2 BY AE3 A MATRIX having AE2 rows and AE3 columns where all elements have value AE1A AE2 BY AE3 MATRIX having AE2 rows and AE3 columns where all off diagonal elements have value 0 0 and all diagonal elements have value 1 M 1 AE2 AE3 BY 4 Submatrix of M starting at row and column AE2 for AE3 rows and AE4 columns 8 77 PINOYS AYYYYIXIL ur1ejoereuo jse ul 31ON 1939 N3931INI VL 5 jo JaquinN jo unop q ZV ysoy TV 35 Air enb3 SLInSd3 ONINVAN SHOIVHddO SdOIVuddO AVWUVIX3L d uorsseJdxo AVWWVIXIIL 9 ST STUL dLONO DNIGNTOXd ONINLS AWVULIGNV i3 uor sso1dxo YJ JLNI ue eq p nous uldV 0192 93 2 1 JO 6 IV AVHHVIXG3I 9 sit se se
6. are arithmetic expressions P is non dynamic variable or an array element and S is a statement This statement causes statement S to be executed once for each new value of P the iteration variable The statement is executed as if it were written as El P Li IF gt Ej THEN GOTO 12 see note 1 below S P Ps Ll 2 FORE PSTEPE WHILE B po 5 where Ej 2 P and 5 as above and B is any Boolean expression Execution of this statement is analogous to the previous statement Ex ecutions of statement S continue as long as a B is true WHILE b B is false UNTIL WHILE P B DOS 39 FORE UNTIL where E B and are as above This statement behaves as indicated in 2 above except that the iteration variable is not incremented WHILE 4 UNTIL DOS where B and S are as above This statement behaves as type 3 but has no iteration variable CONTINUE STATEMENT This is a statement which causes a jump to either the incrementing or testing part of the FOR statement when execution of the remaining body is not desired Example FOR 1 P STEP 1 TO L0 DO BEGIN IF 7 THEN CONTINUE END would cause execution for values of P 1 through 6 8 and 9 Note 1 For TO this operator is gt for THRU the operator is gt If the iteration variable changes sign or ever equals zero then another form of the FOR statement should be used
7. digits and are written with a terminal decimal point Examples is 770770770777 3 REAL i e floating point constants are expressed in two ways either by digits both before and after the decimal point for example 3 5 or 0 3 or by the exponential designation with an optional decimal point Examples 2E 3 equals 0 002 42 equals 2000000 0 2 610 equals 20000000000 0 4 FIXED i e decimal fraction constants are expressed by a decimal point followed by 1 to 10 digits Examples 2 497 002 Ba 6 FALSE Note THUS There is no facility for octal fraction constants in LEAP BOOLEAN constants are expressed as either TRUE or this 1s not valid for typed input to a READ statement 354 0 is 35 15 39 is ion is TRUE is REAL decimal INTEGER octal INTEGER FIXED BOOLEAN DIE DYNAMIC VARIABLES A ARRAYS An ARRAY is an ordered collection of ELEMENTS particular array element is indicated by specifying a unique subscript for the element as illustrated below Q E2 E3 In 1 the Ei are any INTEGER expressions n is the number of dimen sions of the array and A is the name of the array Each array element has a value The data type of the elements of an array is specified when the array 1s declared e g REAL ARRAY A An array may be declared with size and dimension information if this information is specified then storage will be allocated at
8. 19 E COMPOUND STATEMENT It is often desirable to have a number of statements act as a single statement group of statements which is preceded by the word BEGIN and followed by the word END is called COMFOUNDSTATEMENT Note that compound statements may be nested Compound statements have local declarations of non dynamic variables of types REAL INTEGER BOOLEAN and FIXED immediately fol lowing the word BEGIN These variables are local in the sense that they may not be referenced from outside of the compound statement but they may be referenced anywhere between the current BEGIN END parentheses The NAMESs of these variables may have been used in an outer compound state ment or in the main program declarations In this case a NAME always refers to the variable declared in the current innermost compound state ment Note that one may GO into the middle of a compound statement P BLOCKS compound statement in which dynamic variables are declared is called a BLOCK Iteration statements om statements see appendix 2 and PROCEDURES see section VII are also BLOCKS One may not GO into the middle of a BLOCK VI COMMENTS Comments may occur anywhere in a program where a statement or declaration may occur Comments begin with the word COMMENT and end with a semi colon Any string of characters excluding semi colon may appear in between VII PROCEDURES A PROCEDURE is a subroutine which may or may not expect
9. ANI 32312 4719 33Z I N2023 NOISS Y SONY 030803 3S332Y31 31IHM 324043250 802533241 520 5901 01 1781 HOLIMS 41 26 3C VHS 205017 15 135 4311135 Nanly 3 0 3394273150935 1Y103 OS 1nd WALI Ind 71397150 553311 HNA WVHA 392 1 442901 29042 11 1 ANI d BH 934033139 Ho V3 404 3571 3 3 1130043 1103 00 31VAT115Y30 1N34402 391120415 75 939 2165 NY X033X NGHM 452350 1413 30 11 6901 201 NYHL X191 1013016 1405 318311840135 4342945135 ASVWHSYHL3S 3301934 321N50233 NONOY 33 300255305 1Ndind 194200 Alaa ad NaN LIM W3LIMJN Win NNO f SON 1 XANI 014109 3403 TV N331X3 ONG ANN 31 130 5502 3135072 WIIG AYYa 1D T2 31 V1SNYM12IS 73 71 123103 dNn8 1323919 NIY NYJA NONE SALNIEg ONT ANIG NINAD 32 X1 1810 Di ye HILING 33543110 37971703 30 1 NV 1995 V418 3 3NVH24S8 318V1n23X3NONE 741419 VONY CX38 XVAAD 31931134 lt 617810 3905341100 yo 20430 3364 20 130 SO30M73 18533H V31 24115551 9 2140 194318 8 31810n23X3 D 2 5 11910 1534030 90 34AYN31140 39441915920 ONSADV al 8 A1NOQ0Y348 3048 211 9 4139 NI NK p LNN0D 31 0 1 517191 0 633041540410 G0 o 3002035337132 3105 02 37187311546 60417816 12310448 0570943349 TWINIS 34417170
10. Set length to LENGTH pages Set datatype to y DATATYPE examples Set the status of file RR to be Read Only and 10 pages in length Leave other status information unchanged 10 SETSTATUSOF RR 8READONLY v 8LENGTH d REPORTSTATUSOF The status of the file NAME is used to set the values of the following reserved variables 92 50 INTEGER 1 LEGAL DEFINED FILE 0 LEGAL DIRECTORY NAME BUT NOT DEFINED 1 NOT LEGAL DIRECTORY NAME aLENGTH INTEGER No of PAGES aDATATY PE INTEGER DATATYPE VALUES HAVE THE FOLLOWING MEANINGS UNSPECIFIED BINARY LINCOLNWRITER TEXT PROCESS ARRAY LIBRARY FILE MK 4 5 DIRECTIVE 6 USER DIRECTORY 7 TABLET RECOGNIZER DICTIONARY 8 EXTENDED LINCOLNWRITER TEXT FILE 9 RELOCATABLE BINARY 10 TAP ASSEMBLER DICTIONARY 11 COMPILED REGULAR EXPRESSION G N aWHICH INTEGER This if supplied in a SETSTATUSOF would set status identical to this file e g To set file RR to identical status with file RA except that RR is one page longer the following code would be written REPORTSTATUSOF xLENGTH 1 LENGTH SETSTATUSOF RR WHICH aEXECUTABLE BOOLEAN aWRITEABLE BOOLEAN BOOLEAN aE XPANDABLE BOOLEAN READTF NAME TA The contents of the textarray TA is set to de the contents of the text file NAME OPENTF Prepares to ouild a new text file Onl one tex
11. 1753411 IJS XVSSVIXS3I XVSNSV NY 40 4107 NI ySLIwVavd 3713 ol 19103 NOILVa 1930 1915903 NOILVy 1930 1VNS03 NOILVyv 1930 17403 NOILVyV 1930 lVW3Od NOILVuUV 1930 174403 NOIL VV 1930 1784903 NOIIV3Y31230 19504 NOILVy 1930 1YW303 1793111 1N3N31Vl1S SW aya SW NI lonsisNOO 1733111 SW NI 120 16 02 1723111 SW NI 150n31SN0 5 1793111 SW NI 12041SN02 1793111 SW NI LONYLSNOD 7793111 SW NI 220nu1SN05 1 93111 SW NI 120 16 02 1793111 SW NI 120 16 02 17237111 SW 12041SN02 1793111 ONT NY 109503 1979 0 183831716 Y 30 3Sn 17939771 038 01553 yo 71793111 1 3431 1N3wW31 1N3N31 1N3N31 1N3W31 QN3 1230 15 V 1S Vis Vis 514 716 07 1 93111 07 1793111 07 1 93111 07T 1793111 11 2 883575 07 1 93111 194503 17937111 I AT1Ynsn 01 POI sof 201 01 001 44 94 fl 24 TZ 01 19 99 59 9 29 I 9 09 45 96 sS S 2 I S 05 2 9 6 P fr JION 61 40433 3S0dSNYN1 YO 3S33ANI 30333 INYNIW33130 04109 30 100 338VINVYA HDLIMS 53915149 15Y318nS yo dav NI 30333 SLYNINW 26 NI 30333 SLYWINW NI 30333 LON SI aVNOISN3WIO 3719015 V NO ONNOS 43403 033Y1230 JNIVA ON SYH 3318VISYA 3INYNAO SIHL 3 31 716 H 2V33404 3AILVI20SSV NV 30 100 OL 1443911 AY133 0 03 1330 0 5041089 30 100 191325915 39 5015
12. 4903 1 93111 15 211 5 N03 19 1503 1793111 9 318 VI4VA V 30 350 1793111 5 NOISS3sdX3 NSIT NV 30 360 1793111 Pf 01553 44 3 NSIT NY LON SI SIHL ff JISVIyVA V LON SI SIHI 2 NOISS33SdX3 NV 30 350 1793111 I XTylV W V 30 3Sn 7793111 z 01553 94 3 NSIT 40 350 1793111 92 40 351 1793111 62 SI 30 350 1 93111 AYyyY NV do 350 1793111 14915 NOISS3wWdX3 1793111 1991 IN3W31VI1S 1793111 12 Lavis IN3W31VYV1S 1 93111 02 230 1 93111 11 NOILV34Y1239 17937111 91 0117 1230 1993111 61 NOILY34Y1230 1793111 eI Sys LIWVaVd 11 1230 1793111 bt 344032094 NOIlVA4Y12030 17993111 21 34104320394 0117 1230 1 93111 LI 1YN331X3 NOI1Y3V12530 1793111 01 011 1230 1 93111 AVMyY 1X31 011 9 1230 1793111 011 1230 1953411 011 1230 17937111 ONIONS NOI1Y3Y3230 1793711 3124416 011 5 1230 1793111 ANI NNI 239 20 4 1793711 N Qq N 6 88434 30433 NOI120003d 2 31009 Y 102304 118 80 4 NOA 001 39441 VIVO 338I1YdNOONI 8 035072 Aa131YnSn 3NI 1003 3501 NI 330333 2 6 5435 50353 OIINVW3S 8 60 NO0302 IN3S V 2NI1132304 404 404 504 999 3 113 W0O33J 361 50953 NOILONGONd 360 1 93111 11 2 531515 WV 881515 11 2 883516 11 2748355 3 1 93111 40953 1945904 22 91334 1915903 1793111 191503 1 93111 190303 1793111 191403 17937111 191303 1793111 199403 719293771 19903
13. JNO 1 0 JAVH 6 1 1 V LON SI NOILY3V1230 138 1 17937111 lN3431Vi1S INANI NI AINO 30220 NYO 011 1230 3713 V dn ANION N3HM 33134Vavd V SV 138 1 yO 350032044 V SSVd VIVO NOLLONAY V 803 038011 93941 VIVO 314816 AINO Nani3y 30 3650 71723111 AWO 011 8 1230 350032059 Y NIHLIM 0350 38 1608 1191139 5 02 17923111 9084 V JO ONINNIO38 1Y 5311924034 ONY 51 7501 ONY S 3JIT 3271230 AINO NV NOI1V4V3530 0 8 02 03391530 S1V201 ANVN 001 2NISSIN 4937351 034vV1230 53119340924 ANYM 001 335 M013353 40 37197 3 31IdW0 5 251 I9 T 9 T PIST I TI 9 21 PII 0 2101 Lr TOT 2001 TOOT 001 9 4 09 Lv 4f 9f I I T9 TI 219 Pf I 0 5171193 Y 5 ORY S833S SI1nY3 58 330032094 V NIHLIM NY 11792 JWVN AV133A0 078 SAV143 0 360 01 919 COL SI WYy90Nd NIYW 3Hl 318YI4Y 43931NI NY 39 1Snw uvYH20Y34 01 LNIWNIYY 0 8 0734 01 LNIWNIYY 0 8 OVJy 01 099 03NI d30Nn NY OL WANONAS 04009 0 3 1 SI 319 1 0117 311 SIHI 1V201 V LON SI 319 1 NOI1V3311 SIHL WI V3234 1 2 71759071 V LON SI 3197 011 311 JYAN3IT 17937111 3313WY4Yd IJS 1923111 X W 02 03591
14. STATEMENTS PRINT b XEROX C SHOWTEXT STORETEXT 2 FORMAT STATEMENTS 3 FORMATTED OUTPUT STATEMENTS a PRINT FORMAT b XEROX FORMAT C GATHER FORMAT 4 THE OUTPUT LIST 40 IV TEXT AND NUMERICAL INPUT The facility for typewritten input to a LEAP program is line oriented and format free Normally see SETSMACKER procedure a line which is being typed in is not processed until a read in key or carriage return key is pushed Five special function keys are allowed a The DELETE key deletes the previous character typed unless there is no previous character on this line b the WORD EXAM key delete the previous input word on this line and any trailing spaces or tabs C the NO key delete all previous characters on this line d the YES key types a clean version of the input line so far e the READ IN key terminates the line using it as a text file name and pushes the contents of that text file onto the source of input characters An input line consists of a sequence of input words separated by spaces and or tabs The READ statement takes a list of variables as its argument and attempts to read one input word into each variable working from left to right until the argument list is exhausted If there are not enough input words to satisfy the argument list the system will wait for sufficient input from completed input lines to be typed As each input word is read into a variable allowed data type conv
15. as a parameter the first specifies a value parameter the second a reference parameter One can pass any item expression as an item parameter only an itemvar may be passed as an itemvar pa 4 There is a facility for binding locals with an arbitrary Boolean expression in the upper part of the foreach statement Boolean pression in this context must be preceded by andb Example foreach X in S andb y X 6 do 5 There is a facility for declaring and using up to six properties in LEAP A property may be assigned to or removed from an item if the item has a datum Also one may ask if a specified item has a specified property Examples begin real itemvar X set 5 property B real newitem 2 X assign A to X foreach Y in 5 do if Y is A then delete A from X 89 6 When using writestructure and readstructure the user snould caroful that the program in which a structure is written should be Compatible with the program in which the structure is read This simply means that the item declarations in the two programs should correspond Since there is no symbolic communication between LEAP programs only tne order of declaration of items the data type of the corresponding items and the total number of declared items should match 7 The mergestructure statement allows the user to merge compatible LEAP data structures Example mergestructure ABC when this statement is exe
16. as previously defined If these errors occur the user should consult the staff Gis SEMANTIC FAULTS These faults occur in the semantics of the language and are noted by the comment FAULT XXXX EDITARG line in error where XXXX and EDITARG are as defined for production errors complete tabulation of both compile time and run time errors and probable causes is presented below The LEAP compiler was written using the VITAL compiler compiler and is housed in the VITAL system For information about VITAL see reference 7 97 1111 0493 sN Y YO LNVISNOD 38 LSnW X30NI SW 1793711 JAYS 503 LNIWNIYVY OVE JAVS 303 1 3 09 AVE NOISS33dX3 WITT 71723111 41533053 1793711 NOILINI 330 350032054 V 30 3016100 0360 38 LONNYD 3390153923775 11 SONIO HOIHM 1N3N31YV1S 9573903 30 3015100 175057 Y 3Sn LONNYD NOA 318VI V 1999771 SlN34AnO94V 30 x38NnN 9NOSM 3Hl HLIM 031172 SI 330032052 6 1N3N31V1S NOIIYS311 30 30151010 0350 38 LONNYD 3 IING 318 1 NOL1V331lI 1793111 31871 011 9831 71793111 1 3809 4 3500372054 1 93111 i 318 1 32 353 335 1793111 53431 37191 JAVH SNOISS334d4X3 534 1 37191 2 5 0155354 3 39441 31811 4 402 1 3AYH SNOISS33dX3 XI31V4 V LON SI 38 ISAW H108 YOLVINWNIDY DIWYNAO 3 1 NI SI NOISS3YdXI JNO AINO S3dAL 33811YdWODNI SNOISS3uUdX3 S3dAl 31811VdWODNI JAVH SNOISS3U4dX3 191525905
17. contains a jump to an internal routine which prints a canned message regarding the source of the error and then calls help The user however may push and pop this stack of error labels to set his own handling of errors in various parts of his program 91 description of the routines and reserved variables follows SETUPTEMPFILE LENGTH BOOK This routine sets up a non executable auto expandable ephemeral file of LENGTH pages in the specified book The reserved textarray variable x FILENAME is set to the name of the file e g 43 201763 SETUPFILE BOOK This routine sets up the indicated file in the specified book using the status information in the directory If the file doesn t exist an error is signalled SETUPANDNAMEFILE LENGTH BOOK This routine sets up a new file with the indicated name status non executable auto expandable of LENGTH pages in the specified book Any previous uses of the name are dropped WHATSIN fBOOK MAP This routine sets NAME to the name of the file in the specified book and map If that slot is empty NAME is set to the null textarray i e SETSTATUSOF WHICH The status of the file NAME is set to be the status specified by the integer WHICH typically this is an OR ing of the following reserved variables BEXECUTABLE BNONEXECUTABLE 8 WRITEABLE BREADONLY BUNPROTECT BPROTECT BEXPANDABLE BNONE XPANDABLE BLENGTH
18. created automatically when required e g when a use is made of a non existent group when an item is put into a non existent group When a group is deleted all uses of it are automatically deleted Display subroutines groups are not re entrant the structure of the picture resembles a tree One creates the first kind of display item as follows 1 Declare the ID of the display item a 16 bit integer with a call 2 Put points lines conics and or text into the display item via PUTPNI PUTLINE PUTMAT and PUTTEXT calls and 3 Put the display item into a group via the PUTITEM call Ifthe display item is put into group zero it will be displayed The line will be drawn from the last position of the beam ii The PUTMAT routine expects as input the parametric homogeneous matrix representation of a point a line or a conic For further information about matrix representations of picture parts see Reference 9 29 As an example of a LEAP program which uses the display output facility we have written down a program to display the scope diagonals START CLEARSCOPE SETITEM 11 LOADPNT 1 1 0 1 0 PUTLINE 12 0 2 0 PUTITEM 0 SETITEM 12 LOADPNT 1 0 1 0 PUTLINE 2 0 2 0 PUTITEM 0 FINISH 26 9qni e5e101s o1 3 95 Sp 19jjnq way Ae dsrp 1u rno 193jnq w Ae dsip 911 0 pepuadde sr pajyeojpuy eu jou ST i j
19. data descriptors which are separated by vertical bar or slash In addition to separating data descriptors a slash causes a carriage return to be inserted on the 48 output line when the format description is applied to data to be output Data descriptors in a format specification are matched to data arguments on a one to one basis A full discussion of the format scan and list matching follows this section In general a data descriptor consists of a combination of desig nators to specify the different portions of the data argument which is to be printed Nesting of data descriptors is accomplished by parentheses preceded by an optional replicator see the examples The general form for a number specification is SIGN WHOLE DESIGNATOR POINT FRACTIONAL DESIGNATOR CONVERSION MODIFIER Some of these fields are optional see the examples Numbers are converted to characters according to the conversion designator These are for octal integer for decimal integer for fraction tif 3l 71 WI for mixed plus exponent of 10 for mixed number and gt zl for alphanumeric The modifier is an integer constant specifying the power of ten or eight for octal integers which multiplies the number before it is placed for output For example I 2 would cause the integer to be mul tiplied by 100 1 0 before processing The sign of a number is specified by an optional portion of the Specification The sign may ha
20. e g equalities are local to the 5 Statement in which they are defined 3l APPENDIX III PRIMITIVES FOR INTERACTIVE INPUT The facility for non typewritten interactive input to a LEAP program has two parts set of reserved variables and functions which directly indicate the current state of the indicated input device see Table and B simple sublanguage for communicating with the part of the time sharing system which handles input interrupts The interrupt sublanguage allows LEAP programs to activate the various input devices at a TX 2 condis thereby asking the time sharing executive to gather relevant information at the exact time that an input event occurs and report this information to the user when he is next active The user may ask for certain status information to be recorded along with the specified input event For example he may ask that the real time clock reading be recorded whenever a knob changes state 1 ACTIVATE 5 REPORTING _ The time sharing executive reports input information to the user by maintaining a list of events each with appropriate cause and status infor mation The user may ask for information about the next event an entry will be removed from the list of events and the cause and status information will be reported to him If the list is empty he will be notified The user calls a reserved procedure to get information about the next
21. fact search and retrieval facility and the ability to use a TRIPLE itself as a component of another TRIPLE In the discussion below reserved words in the language are underlined A COMPONENTS OF A LEAP DATA STRUCTURE Conceptually a LEAP data structure consists of a universe of ITEMS a universe of TRIPLEs and a number of SETs 4 ITEMS ITEM is an entity whose internal identifier name is manipu lated by the LEAP system An ITEM may have an associated datum this must be specified to have one of the data types of the base language further details see references 4 5 and 10 WNot to be confused with display items 75 which we will refer to as algebraic types Some allowed algebraic types arc listed below real integer boolean real integer boolean or fixed array For example the declaration real array item LINE4 would specify an entity LINE4 whose datum was an array of real numbers perhaps containing end point coordinates The LEAP language contains elements which are used only as algebraic quantities only as names without algebraic type and in both ways ITEMs with algebraic type The LEAP language has various statements for creating ITEMs and entering them into the initially empty universe of ITEMs Declaring an ITEM will enter it at compile time the facilities for dynamically entering a new ITEM at execution time are presented in Section B TRIPLES The TRI
22. input parameters and may or may not return a result A PROCEDURE must be declared before it is called A PROCEDURE declaration must occur in a declaration portion of the LEAP program see section IX in one of the 20 following forms 1 REAL INTEGER BOOLEAN or FIXED PROCEDURE name of procedure plist statement 2 PROCEDURE name of procedure lt plist gt lt state men t In the above the name is any string of alphanumeric characters starting with a letter The lt plist gt is a list of parameter declarations separated by semi colons preceded by and followed by If the pro cedure takes no parameters the lt plist is absent A parameter declara tion consists of a data type specification followed by a list of names which are separated by commas For example the declaration of a PROCEDURE to find the largest number in an array and store it in a specified cell would look like this PROCEDURE BIG fINTEGER ARRAY A INTEGER BEGIN INTEGER I FOR 2 4I STEP 1 UNTIL I AM DO A gt AB END In this procedure AM and AB are procedure parameters They represent the true arguments given the procedure when the procedure is called Two additional declarations are allowed in a procedure declaration to describe arguments They are LABEL L T type PROCEDURE Again type is optional Examples REAL PROCEDURE PYTHAG
23. is an INTEGER expression specifying the size of the TEXTARRAY A TEXTARRAY element is indicated by specifying its subscript Examples IF TA Tide THUN s a 777 and or MATRICES The MATRIX in LEAP is a highly specialized entity It always has two dimensions and its elements are always REAL numbers Only one ex ponent is kept for all the elements the elements are scaled appropriately Thus information is lost if the values of elements differ by too many orders of magnitude Matrices may be declared with no information about the number of rows and columns e g MATRIX name or with such information given 4 MATRIX name a BY b If no dimension information is specified then no storage will be allocated for the matrix elements by the matrix declaration As in the case of the array this storage will be allocated only when an assignment statement explicitly assigns storage to the matrix If as in 4 dimension information is specified then appropriate storage is allocated for the matrix and all elements are initialized to zero In 4 ay bi are INTEGER expressions The declared matrix will have aj rows and columns A matrix element is indicated by specifying the name of the matrix the row index and the column index These indexes may be any INTEGER expressions between l and 256 Examples follow M 1 2 row 1 column 2 element of M M K T 1 row K column J 4 1 element of M Matrices were introd
24. pushed onto the file error label stack qi TYPEERROR 94 This routine takes the values in and oaFILEERRORCODE and uses them to print a canned message as to the cause of the error RESERVED VARIABLE xROUTINECODE aFILEERRORCODE xFILENAME LENGTH SUMMA xWHICH EXECUTABLE XEXPANDABLE YWRITEABLE XCONSOLE DATA TYPE INTEGER INTEGER INTEGER TEXTARRAY INTEGER INTEGER INTEGER INTEGER BOOLEAN BOOLEAN BOOLEAN BOOLEAN INTEGER INTEGER COMMENTS contains number of characters inserted into currently open text file Contains 1 if no text file currently open See discussion at PUSHFILE ERRORLABEL and listing of errors Set to the name of the file set up by the last SETUPTEMPFILE See REPORTSTATUSOF Set at initialization to the number of the map the user is running on Set at initialization to the number of the console on which the user is running 1 2 3 4 5 6 7 8 9 10 11 12 95 REFERENCES Blatt H Conic Display Generator Using Multiple Digital Analog Decoders PROC FJCC 1967 Clark W A et al The Lincoln TX 2 Computer Proc Western JCC February 1957 Curry J E A Tablet Input Facility for an Interactive Graphics System PROC of International Conference on Artificial Intelligence Washington D C May 1969 Feld
25. to either XYZ or W will have identical meaning D NO KEYBOARD BUFFER OPTION The following declaration occurring anywhere in a declaration portion of a LEAP program will suppress the assignment of a keyboard buffer at run time NOKBBF SEGMENTING LEAP PROGRAM DIRECTIVE There is a feature in LEAP which allows the compilation of a LEAP program from text files rather than from a VITAL directive This is useful if the directive 1s larger than two books or 1f core space at com pile time is at a premium Only one text file is set up at a time during compilation Note that 1 The user cannot ask VITAL for a program listing or for a formatted listing 2 Compile time error messages will usually be garbled The use of this feature is described below The user deals with his program in text file form He may direct the compiler to take its input from the keyboard and proceed to specify the text files which are to be read in The compilation is then performed The user directs the compiler s attention to the keyboard by ask ing to compile a program consisting of one special word GETFROMKB He specifies that a text file be read in by typing the name of 66 the text file followed by the READ IN key For example if BLOP is a large program having TAG as a label about half way through then the following sequence of events in VITAL will compile BLOP TYPED BY SYSTEM CLEAN USER 5LEAP USER BLOP USE
26. 10 22018 Y 35474 001 03163093 JAVH NCA joVyols 40 S3009 ANYMW 001 03193n03 s JAVH NOA 6161 3 3741591 HINS ON 0 3 3H1 OL nuHl 9 811173 AD 0112 43 V WONS N3nl3s OL 03191 014400 NO 332333 1N3431V1S 2 3401 V 40 100 01 993151 004 3911514150733 01 NIAID JWYN 390120316 ave IN3N31V1S 9 NI A1dN3 SI 135 135 V 10 350 1 93111 SN31T ANYW 001 AJIT 3344 V NTYT53M 01 03191 AJIT 234Y15323 V 1777535 01 03141 Jo 3Sn 1723111 01343 0 JYNLINYIS 32N30N0dS33305 013483 0 32 0 1 31 04 0 39491 001 SI 351121415 SINILNOY 3 11 12055 JHL 01 0356 4 SYM 93141185301 31VYN331NI 0532 Y 5939 353 1 304933 NY HLIM 100 03411 50553 AVIT AITVWNYON 814 OL 213 65 273 SNOI120n31SNI C3NI 33 130435 35 314 01 3401719 V SI 9 18011034 MJN ONT Lavis NTIS 35018 ANOHLIM IN3N31VIS V M01104 NOIIV4V1523Q0 Y ONIAVH 40 SUNJ NI238 2 11934094 LON 96 55 S 2 I 05 97 Sp fr cr Q s MM FS we m I 536333 8731 5504583 1411 8495 62 J4V4 50123914 1 931 LON SI 3WYN3314J 34135019 2011 340 3113 ON SI 333Hl 1135019 ror 4501233193 77931 LON SI 3NVN31I3i 90239 9166 2001 C3NI d30Nn SI 3wYN3113 310735 s 01 3114 V 10 3NVN 10N SI JWYN3TI4A 110Y33 01 JAVN A30153310 77237 LON SI 3uVN3113 319733 2 01 3114 1X31 Y 10N SI 03
27. 3113 310733 04 3713 V 10 3WNYN LON SI JWYN 10501 161 043 ros 031312345 M03739 NISLYHM 90r 439NnN QYO 03153104d SI 3WYN33113 37133 13 91 JAI1V93N YO 0532 19831 31134334YNONYdn 13S 9 0 4384nN 3008 3791550391 3311334YNONYGn 13S 504 0 31 3 92 19 31 3 31I334YNONYdn 13S r 0 JWYN AW0123310 719937 Y LON SI SNYN 311I343NWVNONVd013S 20 2008 31 3123456 NI 136 073 3313 31133 0 7201365 ros 40123410 NI 031 31345 3009 NI dn 135 38 AVN 3313 319 71123 3 3113441135 413443 LON SI 3008 3H1 311344011365 0123410 NI 031312345 3008 NI dn 13 39 AYW 37134 WILSAS 318 1093 3 311440135 012 438NnN30098 31915650441 311140136 6 02 JWYN 440123414 179371 LON SI 3NVN 311342135 02 3713 V 30 34YN LON SI JWYN 31134401365 202 03 14330 0 SI 3NVN 3113 01365 SAILV9OIN y0 0532 H129N31 3321343dN31dn13S 901 3009 3191550441 3713 4 31 13 01 07 Hl15N3 3 37113443 35 ror 3003 031312345 NI 136 0 3 37113 311394 31 40135 rot SNOILINIJ3O 30333 W31S4S ASYW 22 320 3NON HLIM 3713 OLNI 350712 yo 1nd 01 INTAyL 24 940 0 JNO 3113 1X31 Y 340 OL 1 194903 932044 NI LON 3713 1X31 y0 09 y3iNIOd 3NVN 3113 49 90195340 VWNNV9 VIVO 1N31SISN
28. 530 S1V201 ANYW 001 LOA 310NVH 1 2 61 201 34V Sy313WV Yd 108 NOISS3udX3 NV SV 035 SI HoIHM 3 3TSI V 30 13 4 39 IJS V 3AYH LLNYD 17501 117 SYH LI X0 S1V201 33534 ON SYH 314191 SIH 113 STV501 11 SYH 11 yO S TV501 3334 ON SYH JIATYT 1 1 33H113 319 1 32N333 33 1793111 43931NI 38 1604 s313uVuYd 1793111 j198vVI 1 93111 3019152530 IVNSOd 1793111 3019152530 IYNSGd 1793111 INVISNOD Y LON SI 1N3NOdX3 INVISNOD LON SI 1N3NOdX3 4019217435 V 30 350 1793111 4019217435 V 40 360 17237111 I1NV1SNOD V LON SI N01VYV52I1d3y 318V13Y V YON LNVISNOD V WN3H1I3N SI 8017211438 g353INT NY 30 13 4 AVNOILDVys 3Hl 33V1 1 NOISS34dX3 NV SY 3311935034 V 350 1N3431V1S Y SY 350 1 2 71514044 1793111 V LON SI 1 3 31 1 INTYd Ol I1N3WnOuV SINSWNIYY 30 YSIWON 9NOSM 3Hl HLIM 037179 SI 3500932054 1 1 61 3409 40 s394aN 9NOSM HLIM 0314372 SI 390032032 SIHI SNOISS34dX3 SW NIVHD 1 2 SNOISS34dX3 SW NIYHO 1 2 AlI1Yn03 SW V NIVH2 1 2 NOA er I Opp I p I O P 0 pu ZER 3i 115 06 ive I Op 07 ist Sos 9 40 90 vie 1427 5 2642 ISZ 062 v2 I p 612 2 1 402 9 02 6 02 202 vil 041 PSI 59 LVWHO4 1YW303 1793111 2 11 2 350032054 V 903 19 504 1793111 1172 350935054 V JO 350 1793111 0 0107 1 01110 02 5034 1
29. 8 Allo AS VANS 0 dV AD 190420 9 X30 LEAFRESERVEDS YMB OLS _ 72 J L p lt pz 0 gt 2 CINA PSUP 2508 PNOR q gt gt v l lt gt n x 73 Oe amp 9 E 74 APPENDIX VIII PRIMITIVES FOR DATA STRUCTURING 15 appendix presents a user s eye view of the data structuring tacilities in LEAP The first part of the appendix is a condensation of a DEDET on this topic and is included here as a user s introduction to these facilities The remainder of the appendix is an annotated tabula tion of the language forms for data structuring Part I Introduction to the Associative Sub language The basic data structure entity used in LEAP is an associative TRIPLE of the form ATTRIBUTE of OBJECT is VALUE FATHER of JOE is PETE The data structure is a store of facts in this form The hash coded nature of the data structure makes it amenable to paging techniques Programming constructs are available for creating deleting and searching for elements in the data store Of particular importance is the uniformity of the single data form used A LEAP user does not have to consider the details of a complex structure in computer memory he can concentrate on what he wishes to represent and not how to represent it The programming facilities available include set theoretic operations a powerful
30. ESD TR 70 256 MASSACHUSETTS INSTITUTE OF TECHNOLOGY LINCOLN LABORATORY THE LEAP USER S MANUAL LINCOLN MANUAL 93 ESD ACCESSION 1454 FAI Call No Copy __ of cys P D ROVNER Group 23 11 September 1970 The work reported in this document was performed at Lincoln Laboratory a center for research operated by Massachusetts Institute of Technology This work was sponsored by the Advanced Research Projects Agency of the Department of Defense under Air Force Contract AF 19 628 5167 ARPA Order 691 This report may be reproduced to satisfy needs of U S Government agencies This document has been approved for public release and sale its distribution is unlimited LEXINGTON MASSACHUSETTS gt 139 ABSTRACT This document is a user s manual for the LEAP language LEAP is an extended algebraic programming language which is similar in form to ALGOL Extensions include language forms for display output and interactive input and facilities for building and manipulating associative information structures The basic algebraic language is described in Sections I through IX the extensions to LEAP are presented in the Appendices Accepted for the Air Force Joseph R Waterman Lt Col USAF Chief Lincoln Laboratory Project Office ii B III IV VI VII VIII IX CONTENTS VARIABLES A Declarations CONSTANTS DYNAMIC VARIABLES A Arrays B Textarrays C Matrices EXPRESSIONS Arith
31. II D Reserved functions are presented in Table III E and reserved procedures are shown in Table III F KNOBS TOGS EIR COR KNOBI KNOB2 KNOB3 KNOB4 TBLIX TBLTY TBLTSWI TBLTSW2 TBLTSW3 TOG1 TOG 2 TOGS META 33 DATA TYPE INTEGER INTEGER INTEGER INTEGER INTEGER FIXED FIXED FIXED FIXED FIXED FIXED BOOLEAN BOOLEAN BOOLEAN BOOLEAN BOOLEAN BOOLEAN BOOLEAN NOTES real time clock register knob register reg 377621 8 reg 377621 reg 377622 quarter 1 of knob reg quarter 2 of knob reg quarter 3 of knob reg quarter 4 of knob reg x coordinate of tablet 12 Stylus y coordinate of tablet Stylus Switches which become TRUE aS the tablet stylus moves toward the tablet Surface BITS 1 1 thr 1 9 of reg 377621g if the bit isa 1 value is TRUE 0 gt FALSE META bit on knob register TABLE III A RESERVED VARIABLES AND FUNCTIONS FOR INTERACTIVE INPUT DEVICE NAMES STARGET 3TRACKSTART 3TRACKEND 3SWCHANGE 8SINTMI lt millisecs gt 3INTM2 lt millisecs gt SINTM3 lt millisecs gt SINTM lt millisecs gt SINTMS gKNOBS gKEYBOARD SINKING gTRACKING 34 VALUE OF CAUSE AUTOMATIC REPORT in octal in addition to wCAUSE l cITEMSEEN 4GRPSEEN 2 aT BLIX aI BLTY 3 aTBLTX aT BLTY 4 eT BLIA aT BLIY GS L1 P Bint i ni olt BUT Sxiu uM d ee Oi i tak ta rt 4 12
32. N niui Z3V 5314 3V lt 237 COMAS 13V N jueure 9 XTHLVIA AVYUVLXAL 13V V AVMWV za 19 uorprmnuouodxo ONINVIW Y NOILON i sosoujuo1ed dV pepoeoaud YM UJIM S s u1lu red 14112654116 1 1 JOJVHddO seuo Ie 5351 0 eurqoeu s uo e ST Z XL ILON JV C I caw GOLI3V lO 9AISn oxo eorb5o 5101321999 1 Z3V A uorun Aq iV dV V IdV ANW 5 lt gt d IW SUOTIETOI lt gt o 10 Z dV Z3V 13 uonoenqns dV r dV IIV 33O3LNI S 13V 3114 Ye uofssaidxa YAOALNI y jo 9u1 ST N sooe d Ayeutq N 1 5H y 0 potus 51 I3V JO 57 Ainuenb d3O31NI 3V G 2474 13 19 96 jus 15H 4 dV S 3V lav UOISTAIDp dW X 13 uot eoT Ap Nw x LI0S3 SNINVIW YOLVUIdO 10 BOOLEAN OPERATORS OPERATOR MEANING FORM PRECEDENCE RESULT x NOT B 3 B A AND BlA B2 2 B V OR B1 V B2 1 B exclusive OR B1 B2 1 r 4 5 5 m m WN 7 3 3931 1 IV 3931 1 W NW 5 SI I 1S3H
33. ODNI SYH 4W31I 93 AVyyyLXdL 11443 NY 1103 OL 9 200841443 01 YILIWVAVd 0 8 gt 135 SI 533319 n3sH13119sM ON f 3 6 313418 n3H131I5M dn13S 01 091 1 29 1484311 NOISXJANI NO YVINONIS SI 19 303243 32191 YN NIOfCY 03 40883 XIYLYNINS LS 6 0651 65 051 439 3441 183833310 403 63 3113 211944 3314 639 4 ov 19 431 3 11 93 3113 AINO 1 34VN 39NYH 5 ANY XTSIYVW 403 CSIR33 NI 30333 SIVNTAN NI 30333 009 311 3NO N04 33015 HNW 001 003 N03 33016 001 8 e 3113 1X31 1N31SIX3 NON V 0 01 Q3131 31131 31 SIHL NI 433 NIGVIY 3113 1X31 SIHL NI 33l5VyYHO 1793111 38YIM4YA Y OINI uYHoQ0Y38 V 00 01 03191 NOA JNI SIHI NO S3312V3VH2 001 931493119 NOISYSANOD VIVO 1793111 1943117 Ladino NO M01333A0 7192153 031dW311V NOISYSANOD 3dAl VIVO 17937111 1N3N31V1S 2 NO M01333A0 833308 9 0 4 11 2 S339W0N 33H10 Y gt 9350 039311 194 30501715135 3308 JO 3714 9 11 392 306501715135 N 033Z 40 93713 94119395 JOSNIVISIIS 03NI 430Nn SI 3NYN 30511715135 Y34 30 19 31 5317 LONNYD 305011715135 30123310 1Y233 LON SI 34YN 305011715135 33134 Y 30 3NYN LON SI JNYN 30501715135 1SNI YOY 0315310384 SI 3714 J0Sn1v1S13S 340 3113 ON SI 333H1 4INIVLINd N3d0 3113 ON SI 333H1 31NINYH21nd 3714 V 10 34VN LON SI 34YN3314 3135012 M
34. PLE is an ordered collection of three ITEMs and is used to represent a fact in the relational structure A TRIPLE is created and entered into the initially empty universe of TRIPLEs via the MAKE state ment For example if FATHER JOHN and PETE ITEMs then execution of 1 make FATHER JOHN PETE read FATHER of JOHN is PETE will add the indicated TRIPLE to the universe of TRIPLEs In 1 and are reserved symbols A TRIPLE may be removed from the universe of TRIPLEs via the ERASE statement 2 erase FATHER JOHN PETE i 3 SETs A SET is an unordered collection of ITEMs SETs are created by a SET declaration e g set SONS In this appendix reserved words are underlined 76 initially SET is empty has no ITEMs An ITEM may be added to SET via the PUT statement 3 put JOE in SONS An ITEM may bo removed from a SET via the REMOVE statement 4 remove JOE from SONS 4 ITEMVARs ITEM variables An ITEMVAR has an ITEM as its value An ITEM e g JOE may be assigned to an ITEMVAR e g X via the assignment statement 5 JOE lt X X now represents the ITEM JOE in the sense that the following two statements have the same meaning 5 make FATHER JOE PETE 7 make FATHER X PELES ITEMVARs may be declared with or without an algebraic type example real itemvar X The algebraic type specification is necessary in case it is ever desirable to retrieve the datum of the ITEM that is curr
35. R DIR Fil USER FF TAG USER FRESH SYSTEM FRESH USER INS USER GETFROMKB USER USER BBIN USER F USER FF 5 SYSTEM e E OTHER RESERVED PROCEDURES 1 SHADE This causes the user to go into the shade HELP This causes a HELP call 3 ASSIGNRECOGNIZER lt TEXTARRAY gt The TEXTARRAY parameter indicates the name of the file which is to be used henceforth as the character recognizer 4 There is a reserved procedure which calls the character recognizer RECOGNIZE When this procedure is called a full inking buffer should be available and the ASSIGNRECOGNIZER procedure should previously have been called For information on the TX 2 drawn character recognition facility see reference 67 The following reserved variables will be set up by the procedure c CHAR INTEGER character code 1 if no recognition FIXED maximum X coordinate aXMIN FIXED minimum X coordinate eY MAX maximum Y coordinate o YMIN FIXED minimum Y coordinate aXCEN X coordinate of center FIXED Y coordinate of center EXAMPLE reserved words are underlined START INPUT FILE REC ASSIGNRECOGNIZER REC GETNEXTINT IF aCAUSE 17 THEN BEGIN RECOGNIZE IF 1 THEN HELP END FINISH reserved procedure for going up to the character recognition trainer STRAIN This procedure expects the ASSIGNRECOGNIZER procedure
36. REAL A B INTEGER PROCEDURE AVG INTEGER I J PROCEDURE TEST REAL PROCEDURE P LABEL TAG procedure call may occur as a statement or an expression depend and ing on whether a data type precedes the word PROCEDURE in the procedure 24 declaration A procedure which is to be used as an expression is called a FUNCTION The procedure cal has the following general form procedure name list The a list is a list of expressions variables and elements of dynamic variables separated by commas preceded by and followed Ifthe procedure takes no parameters the lt a list is absent The data type of each element in the a list is compared with the declared data type of the corresponding element in the p list and an error is given if these do not match For example the following is a statement calling the procedure declared above BIG LIST 100 LARGLST where LIST is the name of the array 100 is the maximum size and LARGLST will contain the largest element after the procedure is called Note that there are two kinds of parameters in the above example 1 parameters which are not changed by the action of the procedure but whose values are used VALUE parameters LIST and 100 for example 2 parameters whose values are changed by the action of the procedure REFERENCE parameters LARGLST in this case In LEAP all variables and dynamic variables may be passed to pro cedures as REFERENCE p
37. S 650551 14025 ej I I 01 590333 7739 530333 IndInC Ort Loot 9 6 071 Op I I Or I I O I TOZI OT I APPENDIX VII 64 MISCELLANY OTHER RESERVED FUNCTIONS DATA TYPE FUNCTION NAME ARGUMENTS NOTES FIXED SIN FIXED part of 7 L 5 w 909 SINE REAL SINR REAL number in radians SINE FIXED COS FIXED same as SIN COSINE REAL COSR REAL number in radians COSINE FIXED AX AY both FIXED ARC TANGENT REAL ATANR REAL number ARC TANGENT FIXED SQRT FIXED SQUARE ROOT REAL SQRTR REAL SQUARE ROOT FIXED PYTHAG X Y both FIXED Someones SQRT Xe ye REAL LOG REAL LOG 9 REAL LOGE REAL LOG REAL EXP REAL ex B LEAP BIN MODES The bin command to VITAL may be followed by a vertical bar and an octal number 1 1 causes the LABEL table to be Xeroxed 2 2 causes the SYMBOL table to be Xeroxed 3 4 causes a formatted listing to be Xeroxed 4 10 disables the compilation of code to check subscript bounds and SWITCH bounds S 20 disables the compilation of code to check the data type of LEAP items when is used These mode numbers may be combined e g 17 causes all three listings to be Xeroxed SYNONYM FEATURE One may define a synonym to a declared variable or to procedure in LEAP for example if XYZ is a declared variable or a procedure then W XYZ 65 is a DECLARATION which will assign the semantics of XYZ to W Subsequent reference
38. ST q e JI 91O1S JI uorjoegjqns jas UOTJOSSIS UT 19S 195 SALON c 1dxo 19s 4 1dxo lt 1 19s 1dxo idxo 198 lt Jdx9 1 gt x 1dxo c I1dxo 1 gt 1dxo 1dxo w gt 1dxo gt 1 gt 11 gt 11 gt 1 1 gt 1 gt lt 14 19s 1dxo 19s gt c 1idxo ueo oog lt 19S lt 1dxo 19s lt 19s 1dxo 19s Idxo 1 5 gt IdXxo 195 gt Jdxo 1 5 gt 1dxo yes gt 19s gt suotssa1dxo Jo 3 gt WHO SNOISS dX3 LIS O UIIOJ STU UT 500155 w y JO OM 350 Aue yL A10399JIp S JoSn y ur 5351 po3eorpur 94 Jo 113512135 u1 495415 e ST 39 3191 eui INUL K 1oexo 53 5 OM y JOU 5 OM JT 30 HL ouies u1 1 p 1eorpur y y ST en eA AyledoJd q1 seu u1 dnur JO 5 ul sijsrx e dri1 ul JI INUL 9S ej pue oY ur ST 9u3 INYAL ur 5 Jo Jequinu y ST en eA Jo Ierjriuepr OY ST en eA
39. TEGER variables gt This statement takes a list of INTEGER variables as its argument and attempts to read one input character into each variable going from left to right until the argument list is exhausted The indicated integer character code is stored into each variable Spaces tabs and carriage returns ARE treated as input characters If there are not enough input characters to satisfy the argument list the system will wait for sufficient input from completed input lines to be typed The second READCHAR statement form is similar to the second READ statement form in case of a read error the indicated ID is reported to the user along with the appropriate read error code see Table A4 The user may disable the built in facilities for reporting a read error by executing a statement of the following form SETRDERLBL lt label gt This causes the system to note the indicated label and transfer control to it instead of printing an error message when the next read error occurs Appropriate information is stored into reserved variables when a read 42 error occurs see Table Al The user may cause his program to take its input from a text file rather than from the keyboard At execution time he may type the name of a text file and then hit the READ IN key This causes the indicated text to be read in exactly as if it were typed in When the text file is exhausted a message will be printed out and input will again be taken fro
40. THER Xz PETE and SEX X MALE do STATEMENT In 15 X is a LOCAL There are two context specifications in 15 a SEX X MALE b FATHER X z PETE These serve to determine the collection of ITEMS represented by the LOCAL X ITEM will be in this collection if and only if it satisfies all context Specifications In general there may be many context specifications in a FOREACH statement At execution time a collection of ITEMs is calculated for the LOCAL from the context specifications The STATEMENT is then executed once ior each ITEM in this collection Before each iteration the next ITEM is assigned to the LOCAL Within the limits of the STATEMENT the LOCAL is treated like an ITEMVAR The difference between an ITEMVAR and a LOCAL is only that the LOCAL has special meaning within the FOREACH state 81 ment and no meaning outside of this statement An ITEM may be assigned to a LOCAL only by the internal action of the FOREACH statement This action is said to bind the LOCAL Within the FOREACH statement the LOCAL is termed bound Outside the FOREACH statement the LOCAL is undefined FOREACH statements may be nested a LOCAL which has been bound by a FOREACH statement is treated like an ITEMVAR everywhere within the scope of that statement More than one LOCAL may be bound by a FOREACH statement In this case if there are N LOCALS then a collection of N tuples of ITEMs is calculated when the context S
41. arameters also elements of ARRAYS may be passed as REFERENCE parameters However TEXTARRAY elements subword expressions and MATRIX elements may NOT be passed as REFERENCE para meters to procedures VIII RETURN STATEMENTS Normally procedures and functions return to the calling statement at completion However additional statement is provided to cause the procedure or function to return from anywhere within the procedure body General Form RETURN E where E is required for functions and not allowed for other procedures 22 E must be of the same data type as the function This statement causes the procedure to return to the calling statement If the procedure 1s a function then the function value is E Example FUNCTION REAL PROCEDURE LARGEST REAL X vt DECLARATION IF X Y THEN RETURN X ELSE RETURN Y FUNCTION LARGEST 14 0 A 2 0 8 5 0 CALL IX PROGRAM LAYOUT Each LEAP program must start with the word START and finish with the word FINISH The remainder of the program consists of two separate parts a sequence of declarations followed by a sequence of statements Example START REAL X Y 2 ARRAY A 1 to 40 GOTO L FINISH 23 APPENDIX I PRIMITIVES FOR DISPLAY OUTPUT The display output facility in LEAP consists entirely of a collection of library procedures for constructing and modifying a picture data structure The picture on the screen at the console is generated b
42. arguments The calling sequence generated by LEAP is JES 9 LOC address of argument 1 address of argument 2 address of argument n expected return point n LIST OF RESERVED WORDS AND SYMBOLS Note that all Mark 5 op codes are also reserved words in LEAP 70 20 1X31311 NIS1VHM IIM 34 ONSA 8501 201 HNOYHI MS 1181 43113016 UNIS 311 3418 120135 72974395135 135 014311135335 W 1V 1533 31131X31 NI 2X H1 Ad 341711001 3 n 350 11910 SNAG 390 1857 QIOMSI M3231NI NI 0109 A02 03 13 20091483 d42132 0 30932 Is 43 Y37D C3 Y37D 9 LY ON3dd 350790 2015153 AM VIA W321 DANVIGNN Nel 4901 2901 2 561181 4316 NIS 371 320135 3CO4N3 3135 BAYS JOMLV 15 1504335 W3y YVvHDIVIy 1X311nd 3NI340d JINTYVHDLNd INI 31990 201 13971 T JONA 3191 4151 LONJI 09 3003933334 HS INI J 3sV n 3513 3 120416 090 313134 402 3905390155131 SININY37 2 009 NIV ANY 03 213115 9131350 4053 110344 L NI Val 9901 1901 Mp1 X31 IMS1381 1491 1X31M0HS 311 3 d 13S 317254135 21 Wilwd3y 310V33 0V33 JANI V11nd JINOVG LI 1nd ind 788Yv1303 33114d04d SANI Od WIN 3311520915 HAW W071 SION 110305708 433 20151551 Jl 1NI1X3N139 130 3 311 3 NGHICN3 AV WIAA 3NI 430 SANILNOD 34253131
43. array This statement causes the indicated text to be appended to the XEROX buffer This buffer is maintained by the APEX executive The following statement causes the XEROX buffer to be printed and then cleared DUMP XEROX c SHOWTEXT text array display item ID display group ID X position Y position 1 This is a reserved procedure which causes the indicated text to be added as a display item to the current display structure The indicated position coordinates specify the position of the lower left corner of the first character d STORETEXT text array X position Y position This is a reserved procedure which causes the indicated text to be displayed on the storage tube at the indicated position 2 FORMAT Statements The FORMAT statement is used to define a format descriptor and associate it with a format description format description is used to specify the manner in which printed output is to be formatted For example a format description may indicate the number of digits to be printed after the decimal point of a real number or the number of spaces between fields on an output line or whether to print or suppress leading zeros The FORMAT statement has the following general form FORMAT name of format descriptor format description A FORMAT statement should appear as a declaration in a declaration portion of a LEAP program In general a format description consists of several
44. b Ae dstp gt lt dI dnoi6 Ae dstps lt q wos gt dI lt q dI dnoi6 Ae dstp gt lt GI erjdsrp pexuerq 9e2uo sI dI dnoib lt 1 5 gt SddldlWNVHVd 5 d1ONOdWDiSs ddD4dSs IALINNVISN I IWALINNV Id JONOWALILNd NOTES 1 2 3 4 28 The X and Y coordinates of the display run from 1 0 to 41 0 All ID s are INTEGER expressions All positions are REAL expressions The PUTITEM procedure does not re initialize the display item buffer This implies that one may build a display item and copy it into more than one group Also one may build a display item copy it into a group then add more to the display item copy it into a group and so forth 09 APPENDIX II THE ASSEMBLY CODE OPTION General Description brief version of TX 2 assembly code has been implemented in LEAP allowing the assembly and execution of machine code in LEAP programs The current implementation has no macro facility B Format To begin assembly coding the user types This character causes the compiler to look for MARK 5 information E marks the end o the assembly information and the compiler returns to normal LEAP pr
45. cuted the structure named ABC will be appended to the current structure in the following way a All items in except those declared with no data type will be added as new items to the store of items and b All triples in ABC will be adjusted to preserve the relations between these new items and then will be added to the store of triples Note that both the current structure and the structure to be merged should have no items which were declared with a data type 8 itemvars are treated as simple variables e g real in declar ations i e the existence of an itemvar declaration in a compound statement does not make the compound statement a BLOCK 9 sets are treated as dynamic variables in declarations 90 APPENDIX IX PRIMITIVES FOR TEXT AND FILE MANIPULATION This appendix describes a set of reserved procedures for manipulating textarrays and APEX files The names of files are textarrays containing the text of the name Procedures are provided for setting up files reporting which files are set up setting and reporting file status information reading and writing text files and combining textarrays A flexible error handling facility has been implemented to allow for the variety of errors that can occur Should an error occur a jump to the label at the top of a stack will be executed after the reserved variables aROUTINECODE and aFILEERRORCODE have been set to indicate the cause of the error Initially the Stack
46. dicated ITEM to placed on list of available internal identifiers and the stor age allocated for the datum of the ITEM if any to be returned to free storage ITEMs which were declared via an ITEM declaration may not be Geleted It is the user s responsibility to make sure that an ITEM is not a member of any SET nor a part of any TRIPLE when it is deleted TAE EXPRESSION Thus far we have mentioned three ways to represent an ITEM a by a declared ITEM identifier by an ITEMVAR which has been assigned an ITEM c by n applied to an algebraic expression 78 We will classify these as ITEM expressions An ITEM expression mav always be used in place of an ITEM In addition a TRIPLE form can be an ITEM expression This fea ture allows the use of a TRIPLE as part of another TRIPLE For example the following statement creates a TRIPLE which expresses the idea that the number of lines in a square is four 10 make NUMBER PART SQUARE LINE n 4 In 10 NUMBER PART SQUARE and LINE are ITEMs The TRIPLE PART SQUARE LINE should exist in the universe of TRIPLEs before 10 is executed The ITEM NUMBER is meant to represent an attribute which applies to all part whole relationships D SET EXPRESSIONS declared SET is a SET expression is a SET expression the empty SET A list of ITEM expressions separated by commas all enclosed in brackets 1 is a SET expre
47. digits with trailing zeros A sign will be printed only if the number is negative c FORMAT F3 7 Specifies seven integer numbers which will be treated as character codes and printed as the indicated characters d FORMAT F4 3 4 DI 5 D 6 D E 2A Specifies three pairs of numbers the first of each pair n integer the second a real followed by two character codes 3 Statements for Formatted Output There are three statements which generate formatted output PRINT FORMAT format descriptor output list This causes the indicated output to be printed on the Lincoln 50 writer see the discussion of the output list below b XEROX FORMAT format descriptor lt output 11 This causes the indicated output characters to be put into the APEX Xerox buffer The user program must force this buffer to be dumped by executing a DUMP XEROX statement c GATHER FORMAT format descriptor lt output list This causes the indicated output characters to be appended to a special reserved textarray named OUTPUT This textarray may be used as a parameter to the statements described in section B of this appendix for example The following special statement clears and reinitializes the OUTPUT reserved textarray CLEAROUTPUT There are several restrictions on the use of this textarray i Storage for the elements of OUTPUT is auto matically allocated and is of a fixed length 500 characters Do
48. e form SETSMACKER FALSE READCHAR will return any character typed 44 including the five function keys which obviously have no effect when accessed in such a manner This is a special mode of operation primarily for those who wish to use the keyboard as a set of control keys rather than as a source of input text lines or words Under this mode READ acts as 1t always does but INPTR LINPTR and ISWORDINPUT should not be used The normal mode for the read package 1s restored by executing a SETSM ACKER TRUE Statement 45 DATA TYPE CODE BOOLEAN 1 INTEGER 2 FIXED FRACTION 3 REAL 4 ALPHANUMERIC 5 TABLE A2 DATA TYPE CODES if fractional part 0 gt error if 2 1 gt error TYPE OF N VARIABLE TYPE OF INPUT WORD REAL INTEGER FIXED BYTEARRAY BOOLEAN ZA UA v YLA rs med m mo 1 gt TRUE L Las L mn ROR ALPHAN TABLE A3 ALLOWED DATA TYPE CONVERSIONS FOR THE READ STATEMENT 46 TABLE A4 READ ERROR CODES CODE in OCTAL ERROR 1 illegal mode conversion example you tried to read an INTEGER into a FIXED fraction variable 2 too many characters on this line 3 used ISWORDINPUT while SM ACKER was off 4 you tried to do a READCHAR into a variable of different type then INTEGER 12 tried to read in a nonexistent text file 47 B TEXT AND NUMERICAL OUTPUT 1 Statements which output a text array a PRINT text array b XEROX text
49. ed procedure reports the next occurrence of an input event by setting up CAUSE with the appropriate code and setting up the appropriate reserved variables If there is no event recorded CAUSE will be set to Zero TABLE III F RESERVED PROCEDURES FOR THE INTERACTIVE INPUT SUBLANGUAGE 37 SAMPLE PROGRAM This program displays a smooth line for every line drawn in with the tablet stylus START INTEGER 1 2 FINISH ITEMNUM ACTIVATE SINKING 0 ITEMNUM CLEARINK GETNEXTINT IF aCAUSE 0 THEN BEGIN SHADE GOTO TAG1 END IF aCAUSE 17 THEN HELP IF aNUMSTROKES 1 THEN GOTO TAG2 SETITEM ITEMNUM 1 sITEMNUM LOADPNT 1 1 tINKY 1 11 PUTLINE INKX 1 NUMPOINTS 1 INKX 1 1 t INKY 1 NUMPOINTS 1 INKY 1 1 PUTITEM 03 CLEARINK GOTO TAGI MISCELLANEOUS NOTES 1 One can optionally specify an inking wait duration i e time delay between lifting the pen from the tablet surface and receiving the inking interrupt by specifying an integer value between 0 and 100 when activating inking ACTIVATE gINKING INTEGER gt ACTIVATE BINKING 401 REPORTING BEIR The increment is 5 ms the default normal delay is 500 ms 1 2 second 38 l coordinate value lt l ACTIVATE simply renders the tracking dot visible no input event is associated with this input device CLEARINK must be executed after activating in
50. ed until there are no more arguments If the end of the format description is reached before the output list is exhausted a carriage return is automatically inserted and the scan restarts from the beginning Examples FORMAT F 5 D I PRINT FORMATF A B C causes B and C to be printed as 5 digit integers on separate lines FORMAT F 5 5 D I XEROX FORMAT F X Y cause X and Y to be placed in Xerox buffer as 5 digit integers on one line FORMAT F 2 5D 3D E PRINT FORMAT F 1 I STEP 1 UNTIL I gt 6 DO FOR 1 2 J STEP 1 UNTIL J gt 2 DO Ap Q causes array elements i 4 Ago to be printed as 247 22 real numbers two to a line 52 APPENDIX V SUBPROGRAM LINKAGE FACILITY A GOUPTO AND PEELBACK There is a facility for going up to a LEAP program from a LEAP pro gram with input parameters and output parameters The calling program executes a statement of the form GOUPTO TEXTARRAY expression argument list where the TEXTARRAY contains the name of the LEAP program to be called anc the argument list may be a null if there are no parameters b lt INPUT parameter 1151 if there are only input parameters C OUTPUT parameter list if there are only output para meters and d lt INPUT parameter list OUTPUT parameter list if there are both input parameters may be variables or expressions output parameters must be variables In the called program if the
51. entiy represented by the ITEMVAR In such a case the system assumes that the algebraic type of the ITEM represented is the same as the algebraic type of the ITEMVAR An ITEMVAR may always be used in place of an ITEM LOCALs LOCAL also has an ITEM as its value The LOCAL is used as the iteration variable in the statement It is used as a local ITEMVAR within the scope of this statement hence its name dis cussion of the FOREACH statement and the use of LOCALs is presented in Section G 77 B DYNAMIC CREATION AND DELETION OF ITEMs l DYNAMIC ITEM CREATION There are two ways to create new ITEMS dynamically at execu tion timo via the statement 8 newitem X where X is an ITEMVAR This statement causes a new ITEM to be gener ated assigned to the ITEMVAR and space allocated for its datum unless this is an array The algebraic type of this datum is assumed to be the Same as the algebraic type of the ITEMVAR If the ITEMVAR was not de with an algebraic type then no space is allocated and the new ITEM is assumed to have no datum b via the unary operator n This operates on an arbitrary algebraic expression and yields a new ITEM having the evaluated expression as its datum 2 DYNAMIC ITEM DELETION The following statement removes the ITEM represented by X from the universe of ITEMs 9 reclaim X Execution of this statement causes the internal identifier of the in
52. ersions are made see Table A3 The data type of the input word is determined from its format see the discussion of constants in Section I A and the data type of the variable is known from its declaration Only variables of the following types may be arguments to a READ statement REAL INTEGER BOOLEAN FIXED TEXT ARRAY If a TEXTARRAY variable is the argument an input word will be copied character by character into the indicated textarray starting with the first element in the textarray The value of each textarray element will be the integer character code for the indicated character The next available 41 element in the textarray will have the value 777g to indicate end of word The reserved INTEGER variable CHARCNT will contain the number of characters read into the TEXTARRAY not including the 777g character There are two general forms for the READ statement a READ list of variables separated by commas example READ X Y I IBA b READ lt ID an integer expression gt list of variables example READ 37 X Y I IBA The second of the above forms is used to indicate an identifying integer for the READ statement in case of a read error this integer is reported to the user along with the appropriate read error code see Table A4 The READ statement reads input words there is another statement for reading input characters a READCHAR list of INTEGER variables b READCHAR 10 list of IN
53. event GETNEXTINT This procedure stores the appropriate cause code an INTEGER into the reserved variable CAUSE and device status information into appropriate reserved variables e g if the event were a knob change the state of the four knobs would be copied into the reserved variables aKNOB 1 aKNOB 2 KNOB 3 and KNOB 4 If a request to report the real time clock reading accompanied the knob activation statement as in 1 the reading taken at the time of the event would be stored into the reserved variable If the list of events reserved words in the language are in CAPITALS 32 is empty the GETNEXTINT procedure would store zero into CAUSE and then return The input sublanguage consists of three special statement forms and a number of reserved variables procedures and functions 1 Statements in the input sublanguage a ACTIVATE lt input device name gt b ACTIVATE lt input device name gt REPORTING lt report list gt c DEACTIVATE input device name The input device names are listed in Table III B Note that there are four interval timer device names each of which may be activated with a unique interval time in milliseconds The minimum interval time is 64 milliseconds the maximum is 297 milliseconds The report list consists of one or more report specifications separated by commas see Table III C 2 Reserved variables in the input sublanguage are presented in Table I
54. ic results Four of these operators deal with SET expressions a ATEM expression lt SET expression is a Boolean expression which has the value TRUE if the indicated ITEM is a member of the indicated SET and FALSE otherwise b SET expression is an INTEGER expression whose value is the number of ITEMs in the indicated SET c SET expression C SET expression is a Boolean expression which has the value TRUE if the left operand is a subset of the right operand and FALSE otherwise d SET expression SET expression is a Boolean expression which has the value TRUE if the left operand equals the right operand i e the left SET is a subset of the right SET and vice versa and FALSE otherwise 80 The unary operator GAMMA operates on an ITEM expression to yield the datum of the indicated ITEM For example if PETE is an INTEGER ITEM then the following statement assigns 40 as the datum of PETE 14 40 y PETE The unary operator istriple operates a TRIPLE form to yield Boolean result This result has the value TRUE if the indicated TRIPLE exists in the store G ASSOCIATIVE FOREACH STATEMENT There is a special statement for retrieving information from the universe of TRIPLEs It allows one to specify the context in which the in formation of interest is to be found rather than a procedure for finding that information For example the following finds PETE s sons 15 foreach FA
55. ing data types REAL INTEGER BOOLEAN FIXED i e fixed point fraction MATRIX TEXTARRAY REAL INTEGER BOOLEAN FIXED ARRAY The VALUE of a variable is an algebraic quantity having the specified data type For example if X were an INTEGER variable it might have 46 as its value If Y were a BOOLEAN ARRAY it would have an array of BOOLEAN numbers as its value A DECLARATIONS All variables must be declared The declaration of a variable may Occur either at the beginning of the LEAP program or at the beginning of the outermost COMPOUND STATEMENT within which the variable is used see the discussion of COMPOUND STATEMENTS in Section V E A typical declaration has a data type specification a list of names and a semicolon Examples REAL X Y 2 INTEGER ARRAY A A dynamic variable a MATRIX ARRAY or TEXTARRAY may be declared with information about its dimensions for a complete discussion of dynamic variables see Section III II CONSTANTS Integer constants are converted to either radix 8 or 10 depending on their form Including sign integer constants consist of 36 bits float ing point constants of 27 bits of mantissa and 9 bits of characteristic and iractions of 36 bits Omission of a preceding sign indicates a positive number i Decimal INTEGER constants are expressed by 1 to 11 digits written without a decimal point Examples 3 527 321 923 Octal INTEGER constants are expressed by 1 to 12 octal
56. isplay all objects above the square 16 foreach ABOVE SQUARE PART 2 do DISPLAY 2 In 16 Z is a LOCAL with declared data type REAL ARRAY the DISPLAY procedure expects a REAL ARRAY representing a line as a parameter and an ITEM which represents a line has a REAL ARRAY as its datum The statement 16 may be expressed another way 17 foreach Z and ABOVE SQUARE z Y do DISPLAY 2 In addition to the TRIPLE form the following construct is allowed as a context specification in the associative FOREACH statement lt LOCAL gt in SET expression This context specification restricts the collection of ITEMs represented by the LOCAL by requiring that each such ITEM be an element in the SET expression NOTE Do not attempt to terminate a foreach statememt by a GOTO to a label outside the scope of the statement 83 pextj Sas uea OOd 591 1161 91 XIe ul lt JO 151 gt 195 ISB 1uT up looq bug eo 195 SJ9TJT1u9pr JO 45 gt JP AUI O IT Uo Ayiodoid SNOILVUVTOd UNJONI S E 20 5 104 obenDue oy JO poiejouuy II 54 3391 SY 9Uj oy ST 4113 UT parui y 53 5 w y jo unjep eui ST qd y UT pu
57. jnq ay WALILIS 1e turIs III XIIN3ddV 995 eup Aj1su91ur 3 1nq Wesq aui Ajtsu jur 1 uop 3 4 y uonrsod suorss idx 910321235 Ae dsTp oy ozi erirur JINON lt YI IINI 9 gt dI woz Aeldstp gt 20 Z 1 0 dGOW Nid CI dno45 1 stp uorssoudxo gt lt gt X gt lt gt lt gt uoHIsod A uontisod xX onisod A lt uonIsod X gt WYW IXIL lt uolss idx lt gt x V gt uontsod A gt cuonrsod gt t lt AI 1 Aejdsrp j INON INON Sd dL dIAVUHV d LNdLNO AV IdSIG 4 GAAUASAY WaLIJTYOILS CSLfld CIWRLIILdSdH TQOWNddLdS IVWIOdCINd dNTILOGLNd ANITGVOT LNdGVOT IVIA Lfd ANITLNd INdiLnd WadiLILds IIONYNL IdOOSYV ITO 24 pexue q u u1 pe Ae dSTp ST 92ue3sur Sur 191099 gt 191u99 X gt lt Aetdstps II gt 191u90 A J91u92 dnoJb soy jo CI gt lt gt lt dnoib 43 jo i 191090 Jo c191u90 X lt dno 6 soy GD eouej1sur jo GD lt dno1b edA103oJud GD dno 5 Ae dsrp e 919 9p lt dI dnoi
58. king before inking will occur The pen mode attribute of a display group specifies the relationship between the picture indicated by the group and information to be reported to the user when a target is seen by the pen In the case where a target has subpictures uses as parts the user must specify which item in which group is to be reported when a target is seen He does this by specifying a pen mode for each display group this indicates which group is the working level item ID s from this group are reported when a target is seen There are four pen modes 0 Normal default mode look above here for the working level 1 Picture parts here and below are invisible to the pen 2 Unused 3 Working level this group contains a group of targets report the IDof this group and the ID of the item seen by the pen a x prefixes denote reserved variables which are stuffed by GETNEXTINT e g oKNOBI b prefixes denote device names e g aKNOBS c No prefix see TABLE III A denotes a reserved variable or function whose value is a direct reading of the indicated device status when the reference is made e g 1 39 APPEN DIX IV TEXT AND NUMERICAL I O CONTENTS TEXT AND NUMERICAL INPUT TABLE Al RESERVED VARIABLES AND PROCEDURES TABLE 2 DATA TYPE CODES TABLE A3 ALLOWED DATA TYPE CONVERSIONS FOR THE READ STATEMENT TABLE A4 READ ERROR CODES E TEXT AND NUMERICAL OUTPUT 1 TEXTARRAY OUTPUT
59. lays may be set up and dropped from the map under program control Only one overlay at a time may be set up The main program must be no larger than one book of code and each overlay is similarly restricted At compile time the user must use the BBIN com mand to compile his program if overlays are declared within The overlay facility was implemented for three reasons 1 to help reduce the maximum core requirement both at compile time and at run time 2 to provide an alternative to the GOUPTO facility which may cause large inefficiencies if much information is passed between maps and 3 to get around the requirement imposed by the VITAL system that the total code compiled for any one program not exceed two books Overlay declarations should appear immediately before FINISH in a LEAP program Overlay declarations may not be nested A LEAP 54 program in which overlays are declared should have the following general form START lt entire main program gt DEFINE OVERLAY echaracter string gt lt Statement s DEFINE OVERLAY lt character string gt lt statement gt FINISH Example START REAL X Y 34D x DEFINE OVERLAY OVL BEGIN END FINISH There are three statements in LEAP which are related to the over lay feature 1 CALL lt textarray expression gt This statement causes the overlay with the indicated name to be set up and control to be transferred to the first state ment i
60. m the keyboard Note that no change need be made to the user program The user may re read an input word or input character on the current input line by storing away and later resetting the system s input pointer This pointer is kept in the reserved variable INPTR see Table 1 TABLE Al RESERVED VARIABLES AND PROCEDURES FOR THE LEAP INPUT FACILITY 1 READNUM INTEGER The value of this variable is set to the ID of the offending statement if specified when a read error occurs 2 RDERRCODE INTEGER The value of this variable is set to the read error code number see Table A4 when a read error occurs 3 RDTATYPE INTEGER The value of this variable is set to the data type code of the input word if an illegal mode conversion is requested 4 ENDOFLINE BOOLEAN This variable is set to FALSE at the beginning of each READ and READCHAR statement execution and set to TRUE at the end of the execution if there is no more input on the current line 5 INPTR INTEGER The value of this variable is a pointer to the next character on the current input line 6 LASTINPTR INTEGER This is an integer reserved variable which is used to store the previous value of INPTR Each time an input character or input word is to be read from the current input line the value Note that INPTR may not be reset to point into a previous input line 43 of INPTR is assigned to LASTINPTR If a new input line must be fetched LASTINPTR is reset
61. man J A and Rovner P D An ALGOL Based Associative Language CACM August 1969 Feldman J A Aspects of Associative Processing Technical Note 1965 13 Lincoln Laboratory M I T 21 April 1965 DDC AD 614634 Forgie J W A Time and Memory Sharing Executive Program for Quick Response on line Applications PROC FJCC 1965 Mondshein L F VITAL Compiler Compiler System Reference Manual Technical Note 1967 12 Lincoln Laboratory M I T 8 February 1967 DDC AD 649140 Naur P et al Revised Report on the Algorithmic Language ALGOL 60 CACM January 1963 Roberts L G Homogeneous Matrix Representation and Manipulation of N Dimensional Constructs The Computer Display Review published by Keydata Associates Bedford Massachusetts Rovner P D and Feldman J A The LEAP Language and Data Structure IFIP Congress 1968 August 1968 Sutherland W R et al Graphics in Time Sharing A Summary of the TX 2 Experience PROC SJCC 1969 Teixera J F and Sallen R P The Sylvania Data Tablet Proc SJCC 1968 UNCLASSIFIED 96 Security Classification DOCUMENT CONTROL DATA R amp D Sacurity classification of titie body of abstract and indexing annotation must be entared when the ovaraii report is classified 2 REPORT SECURITY CLASSIFICATION Unclassified 2b GROUP None 1 ORIGINATING ACTIVITY Corporata author _ Lincoln Laboratory M I T 3
62. metic Operators Boolean Operators Matrix Operators Miscellaneous Matrix Expressions Array and Textarray Expressions Textarray Operators Qo m Uu mu Conditional Expression STATEMENTS A Assignment Statement B Transfer of Control Statements 1 Unconditional Go 2 Conditional Go 3 switch If Statements Iteration Statements Compound Statement Blocks COMMENTS PROCEDURES RETURN STATEMENTS PROGRAM LAYOUT moo Iii A A A NO N Lm YF oL LE N N DM 0 A A A WH O Appendices II III IV VI VII VIII LX Primitives for Display Output Assembly Code Option Primitives for Interactive Input Text and Numerical I O Sub Program Linkage Facility Error Detection in LEAP Miscellany Synonyms NOKBBF External Procedures GETFROMKB Compilation Mode Options Miscellaneous Reserved Functions and Procedures Primitives for Data Structuring the Associative Sublanguage Primitives for Text and File Manipulation iv 2 3 29 31 39 32 56 64 74 90 is VARIABLES One may declare and use VARIABLES in LEAP A variable is an entity which has a NAME a DATA TYPE and a VALUE The NAME ofa variable must consist only of alphanumeric characters and must start with a letter The number of characters allowed name is unlimited The DATA TYPE of a variable must be one of the follow
63. n the overlay If a different overlay is already set up when this statement is executed it will be dropped from the map 2 OVERLAYRETURN This statement causes control to return from an overlay to the statement following the CALL statement last executed Note that one overlay may call another overlay the calling 59 overlay is re set up beforo control is returned A GOTO statement which transfers control to a label in the main program may be executed from within an overlay if the label is not within block Note that labels declared within an overlay may not be referenced from outside the overlay 3 DROPOVERLAY This statement causes the current overlay if any to be dropped from the current map gt 56 APPENDIX VI ERROR DETECTION IN LEAP PRODUCTION ERRORS These errors appear in the syntax phase of compiling E They are noted by the following comment PERRXXXX EDITARG line in error where XXXX is the error number EDITARG is a standard argument defining the line in error and asterisks mark the current scan pointer at the occur rance of the error HINT If the error occurs on the first word of the line then the error may be caused by an incorrect end to the preceeding line B SEMANTIC ERRORS These errors are caused by the VITAL mechanisms and may in dicate an error in the compiler They are noted by the comment SERR XXXX EDITARG line in error where XXXX and EDITARG are
64. not attempt to re declare or assign storage to OUTPUT ii References may be made to the elements of OUTPUT but do not attempt to move the 777 character if subsequent GATHER statements are to be executed before a CLEAROUTPUT is done 4 The Output List The output argument list in a formatted output statement consists of arithmetic expressions and braced FOR statements The comma is used to separate list elements The braced f FOR statement is an iterative output argument This means that several elements of the argument list may be indicated by one FOR statement The braced FOR statement has the same form as the regular FOR except that the DO clause is an arithmetic expression or another braced FOR statement Examples FOR 1 1 THRU 10 DO Aj would be equivalent to listing arguments 0 FOR 1 I STEP 1 UNTIL 10 DO 1 J STEP 1 UNTIL J gt 10 DO Aj y By r would be equivalent to listing elements 1 B 1 5 Bo 1 lt a0 ow ode s p a o sa s 5i 10 10 10 1 gt I STEP 1 UNTIL I DO FOR 1 KSTEP 1 UNTIL K gt 3 DOA would cause the variables Aj 2 1 3 2 1 etc to be used The processing for formatted output is controlled by the output list The format description is scanned and processed until a data de scriptor is found The next output argument is then fetched and processed the format scan is continu
65. nversions Blanks indicate that the conversion is not allowed 15 VARIABLE TYPE EXPRESSION 44 REAL FIXED INTEGER BOOL Integer rounded The assignment statement may in fact be an expression if it is nested This facilitates multiple or intermediate stores For example 1 assigns the value 1 to both A and The subword form may be used as a variable in an assignment state ment Example INTEGER X 3 X 1 4 A special case of the assignment statement is the sub matrix store command Example MxN M 3 5 The matrix expression on the left will replace the sub matrix of M whose upper left hand element is in row 3 column 5 If the new sub matrix will not fit into the indicated space an error will be indicated at run time No check is made for overflow strange things may occur if a REAL number larger than or equal to 1 0 is converted to a FIXED 16 B TRANSFER OF CONTROL STATEMENTS Bl Unconditional Go General Form GO GOTO statement label GO TO The GO statement causes a transfer of control to the statement indicated by the STATEMENT LABEL A STATEMENT LABEL is a sequence of alphanumeric characters starting with a letter which is assigned to a statement by prefacing the statement with statement label Example 1 0 gt X Ll X 1 0 X GO TO L1 B2 Conditional GO Statement General Form GO GOTO B gt label 1 gt lt label 2 GO TO This statement causes cont
66. ocessing The form E is equivalent to a statement in LEAP C Restrictions and Notes 1 Equalities are permissible but all symexes used in forming the equality must be defined 2 The special symexes B C D E are not automatically avail able although they may be defined as equalities by the user 3 Configs hold bits bit instructions double indexing and RC s are allowed When defining bit however it is necessary to Separate the quarter bit number by a comma not a period Example SKN 3 YB Configs and subscripts must also be single symexes 4 When reference is made to a LEAP variable the address of the variable is used This means that in the normal case LDA Q will put the value of Q a LEAP variable in A 5 All MARK 5 equalities and instructions must end with semicolons except for the last where is used 6 Forward references are allowed in restricted cases These are MARKS is the assembler for TX 2 30 3 No operation is performed on the symex b The symex is defined later by a in LEAP or a or v in MARK 5 7 Tags are assigned by use of a or followed by a MARK 5 instruction constant etc 5 There is no comma convention and constants follow the rules of LEAP Octal integers must therefore be followed by a decimal point 21 Example JED 56 and LDAX 9 One may not refer to a label equality which has been defined in statement from anywhere outside that statement
67. ooes au squeseudoaJ eui jo etui ST UYOTUM qd y ur 3 1511 Sq1ueseudoJ 191235 1ueumn bae eui JOU ST STU JI uniep 531 Se 11418 1 143 Seu YOTYM 94 s1u s id 9JO1S e JT 31 Se uorsseudxe 241 subrsse pue WILI e 5 JOTJIJUSPT sir se I D lur pejieorpur Seu 9ui squeseudeJ SILON lt 1585 w y gt 5 lt 5 1 gt 2 lt 55 gt It uorsseugdxe gt lt 0 0 55 31 gt uorsseJdxe gt JOeAUIQj I2 lt UuorSsoJudxe gt XIPAUIQ1I UOISSOJdX9 19S lt u 1I gt Suorsseudxe 31 gt uorsseJdxe gt C uorsseudxe ue loog gt SNOISSHUdX3 IVOOT JO IN3LI gt uorsSseJdxe 19s uortsSseudxe gt u lt uotsseidxe 3 gt 1 85 A e x x s19S JO q I A 10 uotun BY st q e JI X e s1os jo q uorun y sr q e JI Ix 1 5 y Jo q ut A uotun y ST q e JT tq 19S oy 51 q e JT Qd Xj 19s OY st q e Ji X q e Xj JSS BU
68. order of decreasing precedence Note that the expression scan is done from left to right When operators of equal precedence are adjacent e g B C then the evaluation is performed from left to right e g B When operators of different precedence are adjacent the operator of higher precedence is treated first When in doubt about precedence parenthesize In what follows A Al A2 etc willrepresent ARRAY s TAL tac TEXTARRAY S M Mi MZ MATRIX EXPRESSION s AE AEl AF2 ARITHMETIC EXPRESSION S B Bl B2 BOOLEAN EXPRESSION s ARITHMETIC OPERATORS The operands for arithmetic operators are of REAL INTEGER or FIXED types and may be mixed indiscriminately in expressions The result of mixed arithmetic is always REAL dV iV IV 4 H3O3LNI dv H3O931NI dv qv JO d dV d d35341NI dv av YZDaLNI av dV Jo 9 7 34 dv l Ins3W D L 8 JY snuiu Areun dV sn d A1eun qv ojn osqe dV j1ed euorjoeug 34 exei dv A YADALNI ue 0 ALVONNUYL qy ue 0 119Auo2 ANNOY Y 119Au02 IVOT IIA NOILO3S 33S uorss idx 244 1 T e J NYL 3591 319 QYSH eui je bunjeijs 96 0 SH3Oa3LNI 3V 31 1O
69. pecifications are processed The lt STATEMENT gt is executed once for each N tuple in this collection the appropriate ITEMs are assigned to the appropriate LOCALS before each iteration For example the following statement would create all paternal grandfather relationships foreach FATHER X Y and FATHER YzZ do make PGRFATHER X 2 Usually the three operands of a context specification of the TRIPLE form may be any ITEM expressions There are cases which are ill defined the compiler makes the following restrictions a At least one operand must be a LOCAL which is being bound by this statement b The three operands cannot all be LOCALs which being bound c The item expression n algebraic expression is not allowed The following constructs specified in BNF are other allowed operands for a context specification of the TRIPLE form other allowed operand gt ITEM expression binary association operator lt LOCAL 82 lt LOCAL gt binary association operator ITEM expression ITEM expression binary association operator other allowed operand An example of the use of these constructs follows In this example there are TRIPLEs having the following forms ABOVE SQUARE OBJECT PART OBJECT LINE ABOVE SQUARE and PART are ITEMs and OBJECT and LINE represent the meaning of ITEMs found in the indicated context The fol lowing statement will d
70. program execution time for the array elements If this information is not Specified then no storage will be allocated until a statement is executed which explicitly assigns storage to the array for its elements see the discussion of the assignment statement in section V A The following is the form for an array declaration with size and dimension information 2 type ARRAY name a to a b to bo TED to 221 In 2 type is either REAL INTEGER BOOLEAN FIXED name is the name of the array The other parameters are explained below is the lower bound on the first dimension if there is to be only one dimension then a must equal 1 1 a is the upper bound on the first dimension b is the lower bound on the second dimension b is the upper bound on the second dimension etc There is no limit on the number of dimensions and the bounds may be any INTEGER expressions B TEXTARRAYS A TEXTARRAY is a single dimensional array of characters each repre sented by its integer character code Like the ARRAY a TEXTARRAY may be declared with information about its size the maximum number of characters in the TEXTARRAY including the 777 character 3 TEXTARRAY name If no size information is given then no storage will be allocated for the TEXTARRAY elements by the declaration This storage will be allocated only by a subsequent assignment statement In 3 name is the name of the TEXTARRAY and AE
71. re are any input parameters a declaration of the form INPUT t lt declaration list 1 must appear immediately after USELEAP or after START if there is no USELEAP The declaration list is similar to the declaration list for PROCEDURE declaration with the exceptions that LABEL and PROCEDURE parameters are not allowed and a program may use the FILE declaration to pass the name of a file or any name in the public or private directory as a parameter in the GOUPTO statement A directory item parameter is put into the connector and the INPUT declaration on the upper map causes the text of the file name to be made available The FILE declaration is used on both maps as follows Examples lower map GOUPTO BLOP FILE SAM For an introduction to the APEX time sharing executive and features of the time shared virtual machine see references 6 and 11 53 upper map in the program BLOP START INPUT FILE XR 0 After the INPUT doclaration on the upper map X behaves like a declared TEXTARRAY variable having the FILE NAME as its value When the called program finishes it may execute a PEELBACK statement PEELBACK output parameter list or simply execute the FINISH statement B OVERLAYS A LEAP program may be segmented into one main program and several subprograms called OVERLAYs At execution time the main program is set up on the user s map and remains set up until execution terminates Over
72. rol to go to either statement label 1 or statement label 2 depending on whether the BOOLEAN expression 15 true or false 12 B3 Switch Statement General Form SWITCH VIA lt INTEGER expression gt TO lt list of statement labels gt This statement causes a transfer of control to the statement label indicated by the value of the INTEGER expression If this value is out of bounds error message will be given Example INTEGER I SWITCH VIATTOTTA L2 L2 If J 1 then control will go to Li If I 2 then control will go to 12 f 3 then control will go to L3 C IF STATEMENTS General Forms 1 IF B THEN statement 1 gt ELSE statement 2 If the BOOLEAN expression is true statement l gt is executed if it is false statement 2 is executed If there is a dangling ELSE clause it is associated with the innermost IF clause Example 1 and lb are equivalent la IF lt 1 gt IF lt B2 gt THEN lt statement 1 ELSE lt statement 2 gt lb IP lt B1 gt THEN BEGIN IF B2 THEN statement l gt ELSE tate ment 2 END 2 IF B THEN lt statement gt the lt statement is executed only if the BOOLEAN expression is true The word IFNOT may be used instead of IF in the above forms in this case the BOOLEAN expression is complemented and then examined 18 D ITERATION STATEMENTS General Forms 1 FOR By P STEP Es DOS TO THRU where Eg
73. ssion example PETE JOE Two ITEM expressions combined by one of the binary associa tion operators isa SET expression The evaluation of these SET expressions requires extracting information from the universe of triples as follows If A and B are the two specified ITEM expressions then a is the SET of all X such that b A B is the SET of all X such that A Xz B c A B is the SET of all X such that X A B The special reserved word ANY may be used in place of an ITEM expression in a binary association operation implying that any ITEM in the indicated position will match 79 Examplo 11 FATHER ANY is the SET of all fathers 5 SET STATEMENTS The SET ASSIGNMENT statement may be used to assign an ar bitrary SET expression to a declared SET e g 12 SONS U BROTHERS SONS There is a special statement in LEAP for performing a task for each ITEM in a SET For example if SONS is SET and X is a LOCAL 13 foreach X in SONS do STATEMENT will cause the STATEMENT to be executed once for each ITEM in the SET Before each iteration the next ITEM in the SET is assigned to the LOCAL Within the scope of the FOREACH statement the LOCAL behaves like an ITEMVAR A complete d scussion of the FOREACH statement is presented in Section G F LEAP OPERATORS WHICH YIELD ALGEBRAIC RESULTS The binary operators e and and the unary operators isttiple and y yield algebra
74. t file ma be under construction i e open at one time 93 CLOSETF NAME Close the current text file and name it NAME PUTCHARINTF INTGR Puts the character INTGR into the next character location in the open text file PUTTAINTF Appends the indicated text to the open text file APPEND B The textarray B is appended to the textarray and the result is put into text array C Any two or all three may be the same textarray or the null textarray PUSHFILEERRORLABEL LABEL If an error is discovered in the file package or a DOFILEERROR is executed control will be passed to the last LABEL pushed The reserved variables xROUTINECODE and aFILEERRORCODE will be set to indicate the cause of the error These variables are volatile over any reserved procedure and should thus be saved quickly If no error is detected in a reserved procedure the values of oaROUTINECODE and oFILEERRORCODE are not defined oROUTINECODE and xFILEERRORCODE are safe over the following reserved procedures PUSHFILEERRORLABEL POPFILEERRORLABEL POPFILEERRORLABEL Cancels the last PUSHFILEERRORLABEL executed If you try to POP too far the top of the stack will contain its initial value namely a label of routine which types the cause of the error and then calls help DOFILEERROR ROUTINECODE FILEERRORCODE Sets the reserved variables YROUTINECODE and aFILEERRORCODE to the specified values and then jumps to the last label
75. to have previously been called TRAIN Ds A procedure which takes a TEXTARRAY as a parameter and goes up to the scope editor EDIT lt TEXTARRAY gt 68 A Two reserved procedures for allocating and emptying books at run time a an INTEGER function which requires parameters and returns the number of an empty book 1 thru 17 as its value Book 0 is automatically free for use allocation of other free books must be done through FREEBOOK b EMPTYBOOK lt INTEGER quantity gt procedure which causes the indicated book to be emptied JED 123 8 KEYBOARDEDIT lt gt This calls the keyboard editor with the indicated TEXTARRAY as input It works just like the EDIT procedure 9 BASICTRANSLATE lt gt This passes the indicated text up 5BTF 69 Gs EXTERNAL PROCEDURES This is a facility for defining a procedure or function that during run time will exist outside the LEAP system The experienced user will find this useful in linking MARK 5 and LEAP programs The following is the external procedure declaration form EXTERNAL lt LOC gt normal procedure definition header where LOC should be an octal integer constant defining the absolute location of the procedure and regular procedure definition follows Example EXTERNAL 411 REAL PROCEDURE SUMSQ REAL Al 2 defines the real function SUMSQ at location 411 with two real 8
76. to the beginning of the new line The system uses the value of INPTR as its pointer into the current input line the user may save LASTINPTR or INPTR and reset INPTR if desired Note that INPTR may not be reset to point into a previous input line 7 ISCHARINPUT BOOLEAN PROCEDURE no parameters This returns the value TRUE if there are any characters left the current input line or if there is another completed input line available the value FALSE is returned otherwise 8 ISWORDINPUT BOOLEAN PROCEDURE no parameters This returns the value TRUE if there are any input words left on the current input line or iz there are input words on any new completed input line the value FALSE is returned otherwise 9 CLEARKBDLINE PROCEDURE no parameters This removes all input from the current input line 10 CLEARKBD PROCEDURE no parameters This removes all completed input lines from the source of typed input 11 READINTEXTFILE PROCEDURE Textarray parameter This procedure pushes the textfile whose file name is given onto the stack of input character sources If the parameter is not a correct textfile name a READ ERROR 12 will result Example READINTEXTFILE STANDARDTEXT 1 12 SETSMACKER PROCEDURE boolean parameter This procedure allows the user to access single characters typed on the keyboard before a carriage return is typed Only the func tions READCHAR ISCHARINPUT are changed After a call of th
77. u uolss idx 141 TIV AVUYVLXAL 01 enbe 13 isnu SAVHWNV ePuorsueurp I Buts 1eu1 SION S Ie19p 190 III uoroes 99g 0192 2 aie suorsuouirp JO AVUUW 31 se seu uorssoaudxo 7 C PHV 9 ZIY 91 Tay NINVdIN INYOd SNOISSUUdX3 AVUUVEXAL ANV AVHUV e 14 G CONDITIONAL EXPRESSION General form B2 El E2 This expression has either or E2 as its value depending on whether the BOOLEAN expression B has value TRUE or FALSE respectively El and E2 are expressions which must have the same data type This may be any allowed data type including MATRIX and ARRAY for example V STATEMENTS There are a number of imperatives called STATEMENTS in the LEAP language These are used to modify the values of the program variables and the flow of control through the program All statements in LEAP must be terminated by one of the following depending on context END ELSE ASSIGN MENT STATEMENT General Form lt expression gt variable or element of a dynamic variable This statement causes the value of the indicated variable to be reset to the value of the expression Examples REAL X Y MATRIX M 4 0 X X x 2 0 Y 0 0 T M 1 0 M 3 3 Data type conversions take place where required and allowed The following table shows the allowed and resulting co
78. uced into LEAP to implement the parametric homogeneous matrix representation for points lines and conics which is described in Reference 9 LEAP has facilities for multiplying inverting and adjoining matrices A complete presentation of the operations which apply to matrices is given in Section IV C LEAP also has a facility for generating the appropriate display instructions from a parametric homogeneous matrix description of a point line or conic see Appendix I Note The word USELEAP must follow START in every LEAP program in which MATRICES are used IV EXPRESSIONS Variables constants elements of dynamic variables and or EXPRESSIONS may be combined by OPERATORS e g and to form EXPRESSIONS An expression has a data type and a value The value is computed by performing the indicated operation For example if X is a REAL variable having 3 6 as its value and Y is a REAL variable having 1 0 as its value then X 4 2 x Y is a REAL expression with 7 8 as its value Note that we would expect the multiplication to be done before the addition when the above expression is evaluated In LEAP the multiplication operator x is said to have higher precedence than the addition operator We can classify the operators in LEAP by specifying their relative precedence or binding power The remainder of this section is a tabulation of the operators in LEAP organized in groups by operand type and arranged within groups in
79. ve either a fixed or floating position fixed sign is declared by having only a single or sign A floating sign is declared by preceding the sign with a replicator larger than 1 This defines the sign field The causes the sign to be printed regardless of its value the causes only negative signs to be printed fixed sign is printed in the specified position at the left of the field A floating sign is printed either at the left of the first significant 49 digit or at the right of the sign field decimal point is indicated by a comma Both the whole and fractional parts of a number are used to describe the digit positions before and after the decimal point The two digit designators are D Print digits but suppress leading or trailing zeros Z Print digits with leading or trailing zeros These designators must be ordered if both are used to describe either whole or fractional parts For the whole part of a number D must precede Z and for the fractional part Z must precede D There are two special output descriptors which may be used in a format description a s insert a space character b T insert a tab character Examples of the FORMAT statement follow a FORMAT F1 6 D D Specifies a six digit decimal integer with leading zeros supressed If a sign is not specified is assumed b FORMAT F2 7 D 3 Z R Specifies a real number having seven integer digits and three fractional
80. y a display processor which accesses and interprets picture drawing commands from this picture data structure Typical commands tothe display processor are ck 1 Place a dot at a specified position the screen 2 Draw a line or conic Segment from a specified screen position with a specified slope and length 3 Display specified text starting at a specified screen position 4 Calla display subroutine to be centered at a specified position relative to the current frame of reference The picture data structure is simply a collection of display subroutines called GROUPS each having a unique 16 bit integer identifier ID Each display sub routine GROUP consists of a collection of display ITEMS each having a 16 bit integer identifier ID which is unique within that collection of items There are two kinds of display items 1 A linear sequence of commands for drawing simple picture fragments and moving the beam and Effectively a separate special purpose computer see reference 1 A positions are REAL expressions ranging from 1 0 to 41 0 24 2 a use of a display subroutine which causes the indicated picture to be displayed as a subpicture of the group The library of procedures for constructing and modifying display groups and items is tabulated below Note the facilities for blanking items drawing dotted lines moving the unintensified beam deleting groups and items and creating uses Groups are

Download Pdf Manuals

image

Related Search

Related Contents

Sony PDW-F75 XDCAM HD Recorder/Player  Manual de utilização  Samsung GE86N-B User Manual  Li-ion Battery Charger  Gravure par sablage  P FIOR uso REFLUX/FO (I)  Notice d`emploi NVX 620  Samsung 150MP Bruksanvisning  Sony : odwp.product_information.title : FWD-32LX2F  Cassaforma per Solai ENKOFLEX manuale tecnico  

Copyright © All rights reserved.
Failed to retrieve file