d.ap ;.rm 70 .title ;^&##########################SCI__APL SLIDES\& , .lit  _-------------- X Systems Control Inc _\ SCI -- VAX /  1801 Page Mill Road _\ Computer /  Palo Alto, Ca. 94304 _\ Center /  (415) 494-1165 _--------  L Mike Liveright   x  @  .end literal l.center ;^&OUTLINE\& .list 4 .le ;INTRODUCTION .le ;APL LANGUAGE ` .le ;APL QUALITIES .le ;IMPLEMENTATION ( .le ;DECUS release .le ;ACKNOWLEDGEMENTS .le ;APLHEL.SCI slides T .end list  .page H .center ;^&INTRODUCTION\& .list t .le ;FALL 1980 DECUS release <  Preliminary version, public domain, source, object, text files on FALL 1980 DECUS tape. h .le ;SIZE 0  6,500 FORTRAN lines, 125 Subroutines, approx. 70,000 bytes of "code", approx. 500,000 bytes of adjustable work space. \  $.le ;HISTORY  .list P.le ;K. E. Iverson 1960.  .le ;BELL Labs C version, DEC not available, BYTE PASCAL version, |Yerazunis FORTRAN version.  D.le ;SCI__APL: 4 Man Months done, 2-4 to do.  .end list p.end list  8.page .center ;^&APL LANGUAGE\&  d.list  ,.le ;DESK CALCULATOR mode  .list X .le ;Right to Left immediate expressions .le ;Assignments .le ;Work space save and restore  L.end list  .le ;LARGE NUMBER of primitive operators x .list @.le ;Standard: +, -, X, %, *, .an, .or, .nt .le ;Comparison: .lt, .le, .eq, .ge, .gt  .le ;Other: .mx, .mn, .mg, PI times, Trig, LOG, LOG(a) l .le ;Shape: Index, Reshape, Ravel, Reverse, Transpose, Grade up, Grade down .le ;Restructure: Compression, Expansion, Outer product, Inner product, 4!Reduction, Scan !.le ;Other: Branch, I-beam, Format, Quad, Execute, Function-def !.end list `" ".le ;OPERATIONS between data structures (# #.list #.le ;Operations on "vector" arguments T$.le ;Special "vector" arguments $.le ;Composite functions .. Reduction, Scan, Outer product, Inner product %.end list % %.page H& &.le ;INTERACTIVE PROGRAMMING LANGUAGE ' t'.list ' <(.le ;FUNCTIONS (.lit ) h) ) G result = dev vec ; ave 0* + ave = +/ vec % X/ R vec * result = vec - ave * G \+.end literal + $,.le ;CONTROL structures SCI__APL , ,.list P-.le ;IF__BEGIN__LOOP condition, i.e. { condition -.le ;BREAK__LOOP condition, i.e. B condition ..le ;NEXT__LOOP condition, i.e. N condtion |..le ;WHILE__END__LOOP condition, i.e. } condition ..end list D/.end list / 0.le ;SCI__APL HELP capability p0 0.list 81.le ;$ HELP APL {topic} 1.le ;------- help {apl} {topic} 2.le ;------- ) d2.end list 2.end list ,3.page 3.center ; ^&HELP LIST\& 3 X4.lit 4 5 help apl {topic} sci__apl:aplhel. 5 5sci__apl control | branching | diag.flags L6 editing G sos | errlev | syntax 6 system.commands | problems | apl__oper 7 and A .an | assign = | branch C .go x7 ceiling,max S .mx | circular O .lo | compress / 7 decode B .de | divide % | drop U .dr @8 encode N .en | equal | .eq | execute B`J .xq 8 expand _\ | format J`N .fm | floor,min D .mn 9 functions | gr.equal _^ .ge | grade.down G`M .gd l9 grade.up H`M .gu | greater > .gt | ibeam.funct B`N .ib 9 inner.prod +.X | i/o L .bx | iota,index I .io 4: lable : | less < .lt | less.equal $ .le : loop.begin { .if | loop.break B .br | loop.next N .nx : loop.while } .wh | log O`* .lg | mat.inv,dvd %`L .mi `; membership E .ep | minus - | negative __ .ng ; not T .nt | not.equal ~ .ne | outer.prod J.$ .so (< or V .or | plus + | power * < reverse,rot O`M .rv | roll,bynom ? | shape,resh R .ro < signum,times X | subscript [...] | take Y .tk T= transpose _\`O .tr = >.end literal >.page > H?.center ;^&APL QUALITIES\& ? @.list t@ @.le ;INTERACTIVE APINP W W: if system command- HX: APLSYS .. Process a system command X: else if edit command- Y: APLSOS .. Process edit command tY: else if help command- Y: SYSHEL .. Process a help command <, and )- q r an individual one is set/unset via )+nnn .or. )-nnn tr r 1 trace entries output_file (writes), m. (message) { eq (exits and quits), e .or. G .or. ^z (exits and saves) 8| |1) a, d, i, p, r, can be followed by a range: '.', 'nnn', or 'nnn:nnn' } p can also be of the form: 'p/', or 'p/.' d} }2) a{lter} and i{nput} are terminated by: 'p.', 'p/', 'p/.', null-line, ,~ or the exit commands: 'eq', 'e', 'G', or '^z' ~ ~3) the a{lter} deletes the text above the first set of 'd-s' and '/'s, X and then inserts characters that follow an 'i' or '_\'  before the text above this 'i' or '_\'. .end literal L.page .center ; ^&ERROR LEVELS\& .lit x ܂-- errlev | @  these are set and unset via the system command l Є )/nnn 4 +1 make all warnings into deadly errors. +2 neglect Domain errors: non-matching element types (default) `+4 neglect Rank errors: arrays have diferent ranks (default) Ć+8 neglect Domain errors: illegal opns on an element. (+16 neglect Length errors: different last array dimensions .end literal T.page .center ; ^&SYSTEM COMMANDS\& .lit -- system.commands | H ) .. gives the list of system commands t)+ n .. sets the n-th debug switch ؋)- n .. unsets the n-th debug switch <)/ n .. sets/unsets the error level .see. errlev )apl .. sets normal apl character set )ascii .. sets ascii apl character set (default) h)clear .. clears the work space ̍)digits {nnn} .. sets the digits/number for display 0)edit {funct} .. enters the function edit mode.. see )help edit )erase {name} .. erases variable or functions from w.s. )fns {fname} .. shows all functions, or function 'fname' \)fuzz {ddd.d} .. sets the fuzz, i.e. print and comparison tolerence )help {item} .. shows the help file {on an item} $)load {file} .. {renames w.s., then} loads the current w.s. )off .. used to exit from apl )origin {nnn} .. sets the origin of Iota and subscripting P)room .. return the amount of memory used )save {file} .. {renames w.s., then} saves the current w.s. )sos {func} .. psudo sos editor for functions. |)time .. shows the current time )var {+} .. shows all the variables D)width {nnn} .. sets the page width from 30 to 132 )wsid {file} .. {renames w.s., then} shows the w.s. file info p Ԕ.end literal 8.page .center ; ^&LOOP STRUCTURES\& .lit d Ȗ-- loop.begin { .if | , { exp1 ""exp1 is optional Xif exp1 .ge. 0.5, i.e. true, the loop block { ... } is executed, otherwise control passed to the statement just after the matching }. a { with no exp1 is defaulted to true. -- loop.break B .br | L B exp1  xif exp1 .ge. 0.5, i.e. true, control passes to statement "after" the ܛclosing }, i.e. breaks out of the loop block. @ -- loop.next N .nx |  l N exp1 Н 4if exp1 .ge. 0.5, i.e. true, control passes to execute the closing } statement, i.e. does the next cycle of the loop. `-- loop.while } .wh | ğ ( } exp1 (wh) while the value of the exp1 is greater than 0.5, i.e. true, Tthen control loops to the matching { , otherwise control passes to the next statement.