A+ employs 0-origin indexing when using firefox to view text pages about aplus use monospace font KAPL and ISO 8859-1 encoding when editing this file aplus-notes.txt use kedit with KAPL font and iso 8859-1 encoding xmodmap usapl.txt necessary to get the alt key to work as expected export LANG=en_GB.iso8859 this may be necessary for scripts export LC_ALL=ISO-8859-1 this may be necessary for scripts ! for factorial is not implemented system variable names begin with `. examples in ~/Downloads/aplus-fsf-4.22/src/a alt shift c generates the comment character, everything on that line is a comment alt shift 4 generates the sort symbol alt shift 5 gives circle with vertical line alt shift f gives depth alt shift 8 gives natural log alt 2 generates high minus alt = generates divide alt [ gives <- operator alt ] gives -> operator (clears error, $ also clears error) alt - gives multiply alt = gives divide alt s gives ceiling alt d gives floor alt ` gives diamond alt q gives ? alt l gives box alt o gives pi times alt r gives reshape $load s loads screen management facilities operating system commands in general can be accessed by preceeding the $ symbol before it: $date $time in other versions of APL the box symbol is used for built-in variables, but in aplus $ is used instead: $pp returns the number of digits of precision which is 10 $mode returns current mode (e.g. apl or ascii or uni) $off logs out of aplus $vars returns all the variables $sfs returns system function names $si state indicator $vers returns version of aplus $reset reset all suspensions $mode ascii set ascii mode $cx c switch to context c $cx . return to root context É10 returns the numbers 0 to 9 3 3 Ғɉ9 returns the numbers 0 to 8 in a 3x3 matrix a <- 'gerbie power' #a returns the number of characters or 12 a <- 'apple' b <- 'pear' c <- a,b stores applepear in c square x: x*.5 $fns returns that square is a function square 1 4 9 16 returns 1 2 3 4 ?3 returns a random number from 0 to 2 100 ? 100 generates 100 random numbers from 0 to 99 12/4 generate 12 4's table û 3 3 Ã’ 1 2 3 4 5 6 7 8 9 table[2;2] returns 9 Ã’ returns 3 3 c.b <- 'abcdef' store abcdef in b in the context of c %`a display a in the root context %`c.b display b in the c context xûÉ3 5 6 create 3 dimension array x x[0;0;0]û50 set the element at coordinates (0,0,0) to 50 aûÉ3 4 create 3x4 array with elements 0 to 11 a[]û5 set all elements of array to 5 a û 1 2 3 a[,] û 4 append 4 to array a 5ß(Õ2) Õ is generated by alt-u 1 2 3 Ê.+ 4 5 6 outer product of + + à 4 5 6 ---Ã--------- 1 à 5 6 7 2 à 6 7 8 3 à 7 8 9 v û 1 2 3 4 5 v[0 1 4] returns 1 2 5 nû10 xûn do Õn returns numbers 0 to 9 xû(nû10) do Õn same thing on one line vû 53 14 27 2 31 85 30 11 67 50 gû`v show `g is `graph display graph of g `g has (`title;"Graph Tutorial Example") give graph a title functions --------- n test t:{ a <- 10; b <- 20; c ,<- a + b; c; t}