running apl.75 in unix v5a look at a0.cold for time period: printf("a p l ? 1 1 _ version 2-E nov 75_1\n"); check tab.cold for operators K this is a string K # works as backspace negative numbers are prefixed by @ e.g. @1 means negative 1 C comment 10 P 2 returns 100 (exponent) 3 = 2 returns 6 (multiply) a ] 35 assign 35 to a a [ 1 < b [ 2 < c [ 3 multiple assignment is possible, set a to 1, b to 2 and c to 3 a - 1 add 1 to a a _ 1 subtract 1 to a -/a sum all elements of a a [ I10 a J.= a generate multiplication table a [ 1 2 3 b [ 4 5 6 a + b returns .25 .40 .50 (division) a [ 1 2 3 a;2' returns 2nd element of a a;1,2' returns 1st and 2nd element of a KappleK;4' returns 4th character of string apple 3Q10 returns 3 random numbers from 1 to 10 a [ I10 3Y a take first 3 elements of vector a M @5 returns absolute value of negative 5 a [ K gerbil power K store string in a O^HM a reverse vector a stores rewop libreg in a O1 returns pi K^H. 5 return 5 factorial or 120 K^H. 3.5 returns 11.6317284 (fractional factorials are permitted) 2 K^H. 5 choose 2 from 5 which returns 10 34 D 23 returns the minimum value 17 S 24 returns maximum value T 1 not 1 returns 0 T 0 not 0 returns 1 3 & 2 3 is greater than 2 returns 1 2 P .5 return square root of 2 a [ 3 3 R I9 assign numbers 1 to 9 as a 3 by 3 array to a 1O1 returns sine at 1 in radians 2O1 returns cosine at 1 in radians 3O1 returns tan at 1 in radians 1 O O+4 returns sine of 45 degrees x [ 3 K x = K < x returns x = 3 L [ a [ 3 assign 3 to a and print result x [ L input value for x a [ 2 2 R I4 L^H+ a return matrix inverse of a a [ I4 a [ 2 2 R a reshape a into 2 2 matrix KcatK E KhatK returns 0 1 1 (2nd and 3rd characters are the same) c [ KcatdogK KcatK E c is cat an element of c, returns 1 1 1 "digits 9 specifies that 9 digits are displayed "drop test1 delete file test1 "edit testo edits file testo "lib shows files in current directory "off exits "origin 1 sets origin to 1 and prints out previous setting "read multi read function multi "vars list variables "width 80 set width to 80 characters missing ------- no way of listing functions e.g. "list fn ibeams ------ B^HN 30 returns width replacement characters ---------------------- < is ; functions --------- comb multi 5 generate 5x5 multiplication table dth decimal to hex, e.g. dth 64 returns 00000040 htd hex to decimal, e.g. htd K44K returns 68