home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / teach.zip / TEACH0.ATF < prev    next >
Text File  |  1997-09-14  |  80KB  |  971 lines

  1. XNÉIO 0 1                                                                      °
  2. XNÉCT 0 1E²13                                                                  °
  3. XCÉFC 1 6 .,*0_²                                                               °
  4. XNÉRL 0 16807                                                                  °
  5. XCÉPR 1 1                                                                      °
  6. XCÉLX 1 5 TEACH                                                                °
  7. *(1991 11 11 8 25 10 304)                                                      °
  8.  FDISPLAY ÉFX 'D╜S DISPLAY A;ÉIO;R;C;HL;HC;HT;HB;VL;VB;V;W;N;B'                °
  9.   'Σ DISPLAY A GENERAL ARRAY IN PICTORIAL FORM'                                °
  10.   'Σ  NORMAL CALL IS MONADIC.  DYADIC CALL USED ONLY IN'                       °
  11.   'Σ    RECURSION TO SPECIFY DISPLAY RANK, SHAPE, AND DEPTH.' 'ÉIO╜0'          °
  12.   '»(0=ÉNC ''S'')/''S╜µA''' 'R╜╞µ,S                   Σ PSEUDO RANK.'          °
  13.   'C╜''┐┌└┘''                 Σ UR, UL, LL, AND LR CORNERS.'                   °
  14.   'HL╜''─''                   Σ HORIZONTAL LINE.'                              °
  15.   'HC╜HL,''Θ╕'',HL,''~+ε''      Σ HORIZONTAL BORDERS.'                         °
  16.   'HT╜HC[(0<R)⌡1+0<╞²1╞,S]' 'ΣW╜,0╧■╞0µΓ(1⌐µA)╞A'                              °
  17.   'HB╜HC[3+3╛(''2⌡~A╧«A'' ÉEA ''1+╞ε0⌡(1⌐⌡/µA)╞,A'')+3⌡1<µµS]'                 °
  18.   'VL╜''│''                   Σ VERTICAL LINE.'                                °
  19.   'VB╜VL,''Φ╟''               Σ VERTICAL BORDER.'                              °
  20.   'V╜VB[(1<R)⌡1+0<²1╞²1╟,S]'                                                   °
  21.   '»(0εµA)/''A╜(1⌐µA)µΓ╞A''   Σ SHOW PROTOTYPE OF EMPTIES.'                    °
  22.   '╕(1<╧A)/GEN' '╕(2<µµA)/D3'                                                  °
  23.   'D╜«A                     Σ SIMPLE ARRAYS.' 'W╜1╞µD╜(²2╞1 1,µD)µD'           °
  24.   'N╜²1+1╟µD' '╕(0=µµA)/SS'                                                    °
  25.   'D╜(C[1],V,((W-1)µVL),C[2]),((HT,NµHL),[0]D,[0]HB,NµHL),C[0],(WµVL),C[       °
  26.  3]' '╕0' 'SS:HB╜((0 '' '')=╞0µΓA)/'' -'''                                     °
  27.   'D╜'' '',('' '',[0]D,[0]HB,Nµ'' ''),'' ''' '╕0'                              °
  28.   'GEN:D╜«DISPLAY■A          Σ ENCLOSED ...' 'N╜Dδ.⌠'' '''                     °
  29.   'D╜(Nδ~1ΦN)≡D' 'D╜(δ≡~''  ''╤D)/D' 'D╜((1,µS)µS)DISPLAY D'                   °
  30.   '╕(2≥µ,S)╟D3E,0' 'D3:D╜0 ²1╟0 1╟«ΓA         Σ MULT-DIMENSIONAL ...'          °
  31.   'W╜1╞µD' 'N╜²1+1╟µD'                                                         °
  32.   'D╜(C[1],V,((W-1)µVL),C[2]),((HT,NµHL),[0]D,[0]HB,NµHL),C[0],(WµVL),C[       °
  33.  3]' 'D3E:N╜²2+µ,S'                                                            °
  34. X 'V╜C[Nµ1],[0]VB[1+0<²2╟,S],[0](((²3+╞µD),N)µVL),[0]C[Nµ2]' 'D╜V,D'           °
  35. *(1996 4 6 16 1 57 400)                                                        °
  36.  FEXIT ÉFX 'EXIT' 'Σ Exit from function' '''To log off type:   )OFF'''         °
  37. X '╕'                                                                          °
  38. *(1991 11 11 8 25 12 312)                                                      °
  39.  FGO ÉFX 'GO;b;e;t' 'Σ Expression driver' 'L0:b╜e╜''''' 'æ╜''       '''        °
  40.   't╜æ' '╕(^/'' ''=t)/L0' '╕((^/'')OFF ''=5╞6╟t)doif ''exit'')/0'              °
  41.   '╕(('':''εt)doif ''b╜evaldd (+/^\'''' ''''=t)╟t'')/L0'                       °
  42.   '''e╜ÉEM'' ÉEA t' '╕(0=µ,e)/L0' '╕b/L0'                                      °
  43.   '''This is not a valid APL2 expression''' 'æ╜''*'''                          °
  44. X '╕(''?''⌠╞1╟æ)/L0' 'e' '╕L0'                                                 °
  45. *(1997 8 22 11 54 54 664)                                                      °
  46.  FHELP ÉFX 'HELP;N;I;T' 'Σ Help to student' '''WHAT TO DO'',r'                 °
  47.   '''  ° To get out of the lesson''' '''       ENTER: EXIT'''                  °
  48.   '''  ° To log off APL2'''                                                    °
  49.   '''       FIRST, ENTER: EXIT  THEN ENTER: )OFF'''                            °
  50.   '''  ° To get help''' '''       ENTER: HELP''' 'do'                          °
  51.   '''This lesson is made up of '',(«N╜13),'' components named TEACHx, wh       °
  52.  ere''' '''the x stands for a digit:'',r' 'I╜0'                                °
  53.   'L0:T╜''TEACH'',(«I╜I+1)' 'T,'' '',1╟notb(ÉCR T)[2;]' '╕(N>I)/L0'            °
  54. X 'endd'                                                                       °
  55. *(1995 4 23 14 14 6 304)                                                       °
  56.  FSVOFFER ÉFX 'DC╜PID SVOFFER SV' 'SV╜(²2╞1 1,µSV)µSV╜πSV'                     °
  57.   '╕(2=ÉNC ''PID'')/DYADIC' 'DC╜ÉSVO SV ╪ ╕0'                                  °
  58.   'DYADIC:╕(1^.⌠DC╜PID ÉSVO SV)/END' 'ÉSVE╜15'                                 °
  59.   'CHECK:╕(1^.⌠DC╜ÉSVO SV)/END' '╕(0⌠ÉSVE)/CHECK'                              °
  60. X 'END:SV╜1 0 1 0 ÉSVC SV'                                                     °
  61. *(1997 9 12 12 42 6 392)                                                       °
  62.  FTEACH ÉFX 'TEACH' 'Σ Introduction to APL2OS2 tutorials' 'initialize'         °
  63.   'copyright' 'welcome' 'do' 'exa' 'TEACH1      Σ Installing APL2OS2'          °
  64.   'TEACH2      Σ Defining libraries and APL2 invocation'                       °
  65.   'TEACH3      Σ The SESSION LOG' 'TEACH4      Σ The SESSION editor'           °
  66.   'TEACH5      Σ Opening and APL2 object'                                      °
  67.   'TEACH6      Σ The SIGNALS menu' 'TEACH7      Σ The OPTIONS menu'            °
  68.   'TEACH8      Σ Customizing the keyboard'                                     °
  69.   'TEACH9      Σ Setting up fonts' 'TEACH10     Σ Changing colors'             °
  70.   'TEACH11     Σ Changing colors of fields'                                    °
  71.   'TEACH12     Σ Setting up F-keys'                                            °
  72. X 'TEACH13     Σ The WINDOW and HELP menus'                                    °
  73. *(1997 9 12 12 41 3 376)                                                       °
  74.  FTEACH1 ÉFX 'TEACH1' 'Σ  Installing APL2OS2' '''INSTALLING APL2OS2'',r'       °
  75.   '''When you install APL2OS2, your desktop acquires a new icon. It is''       °
  76.  '                                                                             °
  77.   '''the one that shows a globe with a highway paved with APL2 boxes.'''       °
  78.   '''Clicking on this icon reveals a window containing additional icons.       °
  79.  '',r'                                                                         °
  80.   '''You may try out the "READ ME", "SERVICE INFO" icons for an up to da       °
  81.  te'''                                                                         °
  82.   '''status of your installed product. The "USER''''S GUIDE" icon provid       °
  83.  es'''                                                                         °
  84.   '''the entry to the on line version of the User''''s Guide manual. Sin       °
  85.  ce'''                                                                         °
  86.   '''you most likely have an updated version of APL2OS2, this on-line'''       °
  87.   '''manual contains corrections and additions not in your hard copy. It       °
  88.  '''                                                                           °
  89.   '''is therefore highly recommended that you access this on-line docume       °
  90.  nt'''                                                                         °
  91.   '''for the most up-to-date information. The same thing can be said for       °
  92.  '''                                                                           °
  93.   '''the icons that represent entries to the "LANGUAGE REFERENCE" and th       °
  94.  e''' '''"GRAPHPAK: USER''''S GUIDE AND REFERENCE".'',r' 'do'                  °
  95.   '''The bright red APL2/2 icon is your entry into APL2. Clicking on thi       °
  96.  s'''                                                                          °
  97.   '''icon invokes a batch file named APL2.CMD which resides in the sub-'       °
  98.  '' '''directory BIN  of APL2OS2 (the main directory for APL2OS2).'',r'        °
  99.   '''At this point you are ready to start using APL2. However, you may''       °
  100.  '                                                                             °
  101.   '''wish to define your own libraries, and change some of the default''       °
  102.  ' '''parameters.''' 'do' '''ADDING LIBRARIES'',r'                             °
  103.   '''To add libraries, you will have to modify the APL2.CMD file.'''           °
  104.   '''Here is the step by step procedure for customizing your APL2/2:'''        °
  105.   '''  1. Click on the small square in the upper right hand corner of yo       °
  106.  ur'''                                                                         °
  107.   '''     APL2 Session Manager window. This will "minimize " it i.e. it'       °
  108.  ''                                                                            °
  109.   '''     will make it disapear from the screen but still keep it active       °
  110.  .'''                                                                          °
  111.   '''  2. Double click on the OS/2 System Editor icon on your desktop.''       °
  112.  '                                                                             °
  113.   '''     (You may have to move windows around to make this icon visible       °
  114.  )''' '''  3. Click on the FILE pull down menu, and select OPEN'''             °
  115.   '''  4. In the Directory box double click on C:(or D:...) where APL re       °
  116.  sides''' '''  5. In the same box double click on APL2OS2'''                   °
  117.   '''  5. Again in the same column, double click on BIN'''                     °
  118.   '''  7. Now look in the FILE box for APL2.CMD and click on that. Your'       °
  119.  ''                                                                            °
  120.   '''     Sytem Editor box will display the contents of that file. It wi       °
  121.  ll'''                                                                         °
  122.   '''     look like the listing on page 11 of your User''''s Guide.'''         °
  123.   '''    | If you want to find a listing of APL2.CMD from your on-line         °
  124.  |'''                                                                          °
  125.   '''    | "User''''s Guide", click on the Guide window. Then select the       °
  126.     |'''                                                                       °
  127.   '''    | + sign on the item "Installing and Customizing APL2/2". Then        °
  128.  |'''                                                                          °
  129.   '''    | select the "Customizing APL2/2" box, then "APL2.CMD" box,           °
  130.  |'''                                                                          °
  131.   '''    | and finally select "Rexx Command File".                             °
  132.  |''' '''  8. At this point you are ready to modify this file'',r' 'do'        °
  133.   '''  To illustrate the process, assume that you have a directory in'''       °
  134.   ''' C:\MINE that contains some of your APL2 workspaces. You would like       °
  135. X''' '''  to define this directory as LIB 12.''' 'endd'                        °
  136. *(1997 7 8 11 34 11 352)                                                       °
  137.  FTEACH10 ÉFX 'TEACH10' 'Σ The color palette' '''CHANGING COLORS'',r'          °
  138.   '''You can change both background colors, and the colors of the APL'''       °
  139.   '''fields. Changing the background color is easy:'',r'                       °
  140.   '''From the Options menu, select the "Color Palette". A window will'''       °
  141.   '''appear with 9 rows and 13 columns of colors. Place the pointer on''       °
  142.  '                                                                             °
  143.   '''the color you wish to have in the background. Press the right mouse       °
  144.  '''                                                                           °
  145.   '''button, and drag it to any spot on the Session Manager window. (A''       °
  146.  '                                                                             °
  147.   '''paint bucket will appear as the prompt). When you release the mouse       °
  148.  '''                                                                           °
  149.   '''button, the background color will change. In the same way you can a       °
  150.  lso''' '''change the color of the other window components.''' 'do'            °
  151.   '''If you do not find a color to your liking on the color palette, you       °
  152.  ''' '''can design your own color:'''                                          °
  153.   '''1. Point to the color that most closely approaches the one you want       °
  154.  ,'''                                                                          °
  155.   '''   and click the left button. A box will surround the color sample.       °
  156.  '''                                                                           °
  157.   '''2. Click on the "Edit color" button. A new window will appear on th       °
  158.  e''' '''   screen.'''                                                         °
  159.   '''3. Move this window to one side so that both the "Color palette" an       °
  160.  d''' '''   the "Edit color" window appear side by side.'''                    °
  161.   '''4. Using the mouse, move the cross-hairs on the color circle and on       °
  162.  '''                                                                           °
  163.   '''   releasing the button, observe the effect on the selected color o       °
  164.  f''' '''   the color palette.'''                                              °
  165.   '''5. Again, using the mouse, move the brightness bar to see the effec       °
  166.  t.'''                                                                         °
  167.   '''6. When satisfied with the color, close the "Edit color" window.'''       °
  168. X 'endd'                                                                       °
  169. *(1997 7 8 11 34 28 420)                                                       °
  170.  FTEACH11 ÉFX 'TEACH11' 'Σ Changing colors of the fields'                      °
  171.   '''CHANGING COLORS OF THE FIELDS'',r'                                        °
  172.   '''When you select the "Fields..." option, a window named "Fields" com       °
  173.  es'''                                                                         °
  174.   '''up on the screen. The window gives instructions on how to change'''       °
  175.   '''the colors of different APL2 fields. Below the instructions it list       °
  176.  s'''                                                                          °
  177.   '''the types of fields using the default color scheme: Some fields are       °
  178.  ''' '''blue, some black, and two are red.''' 'do'                             °
  179.   '''If you try to follow the instructions, you will quickly find that s       °
  180.  imply'''                                                                      °
  181.   '''clicking on the two needed options (Color Palette and Fields) does        °
  182.  not'''                                                                        °
  183.   '''produce the desired effect, namely to have the two windows side by        °
  184.  side.'''                                                                      °
  185.   '''Although there may be other ways to change the color of fields, her       °
  186.  e is''' '''one approach that works:'',r'                                      °
  187.   '''1. Select the "Color Palette" option. and then minimize it'''             °
  188.   '''2. Select the "Fields..." option'''                                       °
  189.   '''3. Click on the "Window list" (the easiest way is to press Ctrl and       °
  190.  ''' '''   Esc at the same time)'''                                            °
  191.   '''4. Double click on the "APL2 Color Palette". Then move the two wind       °
  192.  ows''' '''   so that they do not overlay each other.'''                       °
  193.   '''5. Select the color from the color palette, and pressing the Ctl ke       °
  194.  y'''                                                                          °
  195.   '''   to drag the color to the desired Field on the "Filelds..." windo       °
  196. Xw.''' 'endd'                                                                  °
  197. *(1997 8 22 12 29 40 512)                                                      °
  198.  FTEACH12 ÉFX 'TEACH12;SCROLL;T' 'Σ Setting up F-keys'                         °
  199.   '''SETTING UP F-KEYS'',r'                                                    °
  200.   '''Function keys are used in APL2OS2 in many contexts. A complete'''         °
  201.   '''discussion of their usage must be delayed until such time we cover'       °
  202.  '' '''the various Auxilliary Processors.'',r'                                 °
  203.   '''However, as long as one deals only with the Session Manager, and'''       °
  204.   '''the related "Options" pull down menu, there is a way to define F-ke       °
  205.  ys'''                                                                         °
  206.   '''with the objective of saving typing effort. On installation, APL2OS       °
  207.  2'''                                                                          °
  208.   '''defines a default for the first 12 F-keys. To find out what these''       °
  209.  '                                                                             °
  210.   '''defaults are, simply select the "F-keys..." option. The "F keys"'''       °
  211.   '''widow displays the current meaning of the 12 F-keys. A button in'''       °
  212.   '''front of each definition provides for a check mark. A check mark'''       °
  213.   '''will cause the definition to be displayed on the screen, but not to       °
  214.  '''                                                                           °
  215.   '''be evaluated. A definition without the checkmark will be immediatel       °
  216.  y''' '''evaluated.''' 'do'                                                    °
  217.   '''To change a definition, mark the desired F-key line and enter the n       °
  218.  ew'''                                                                         °
  219.   '''definition. To place (or remove) a check mark, simply click on the'       °
  220.  '' '''button. Pressing OK will complete the definition process.'''            °
  221.   'do'                                                                         °
  222.   'T╜ÉFX ''SCROLL;T'' ''''''This line displayed every second'''''' ''T╜É       °
  223.  DL 1'' ''╕1''' '''SCROLL and DISPLAY STACK'',r'                               °
  224.   '''The last items on the "Options..." pull down menu are toggle switch       °
  225.  es.'''                                                                        °
  226.   '''The usage of these toggle switches may not be very clear unless you       °
  227.  '''                                                                           °
  228.   '''are VERY familiar with APL. Nevertheless feel free to experiment:''       °
  229.  ' '''To see how checkmarks affect the action of APL2, enter:'',r'             °
  230.   '''    SCROLL'',r'                                                           °
  231.   '''and wait until the listing goes to the bottom of the window. Then''       °
  232.  '                                                                             °
  233.   '''press BREAK, and display the stack ")SI". Repeat this exercise for'       °
  234.  ''                                                                            °
  235.   '''different combinations of the "Scroll", "Display stack" and on leav       °
  236.  ing''' '''APL2, "Confirm Close" options.'',r'                                 °
  237.   '''The "Save Continue" toggle switch allows you to save the APL2 sessi       °
  238.  on'''                                                                         °
  239.   '''when you close APL2. If this toggle swith is checked, and IF you lo       °
  240.  g off'''                                                                      °
  241.   '''by clicking on the upper left button of the Session Manager window'       °
  242.  ''                                                                            °
  243.   '''followed by selecting CLOSE, then on re-entering APL2, the session'       °
  244.  ''                                                                            °
  245.   '''will continue as if there had been no interruption. Your session ha       °
  246.  d'''                                                                          °
  247.   '''been saved in workspace CONTINUE. You can remove this workspace by'       °
  248. X'' '''entering:'',r,''    )DROP CONTINUE''' 'endd'                            °
  249. *(1997 7 31 13 40 7 460)                                                       °
  250.  FTEACH13 ÉFX 'TEACH13' 'Σ The Windows and Help pull down menus'               °
  251.   '''THE WINDOW and HELP MENUS'',r'                                            °
  252.   '''The last two pull down menus (WINDOW and HELP) are of not much use.       °
  253.  '''                                                                           °
  254.   '''The "Windows" menu contains only one option: the "APL2 Window list"       °
  255.  .'''                                                                          °
  256.   '''When selected, it will display ONLY the currently active APL2 objec       °
  257.  ts.'''                                                                        °
  258.   '''To see a list of ALL active OS/2 objects, press Ctrl AND Esc'',r'         °
  259.   '''The "Help" pull down menu DOES NOT provide the APL2 documentation.'       °
  260.  ''                                                                            °
  261.   '''There are five items on this pull down menu, none particularly usef       °
  262.  ul:'''                                                                        °
  263.   ''' HELP INDEX lists an outline of the OS/2 features associated with a       °
  264.  '''                                                                           °
  265.   '''            window, editing text and pull down menus (most of it ha       °
  266.  s''' '''            been covered by this lesson).'''                          °
  267.   ''' GENERAL HELP describes the behavior of the APL2OS2 window.'''            °
  268.   ''' USING HELP describes how to access the OS/2 documentation.'''            °
  269.   ''' KEYS HELP lists the usage of key combinations to produce specific'       °
  270.  '' '''           effects (as an alternate to the use of the mouse).'''        °
  271.   ''' PRODUCT INFORMATION is just an expanded copyright note'',r'              °
  272.   '''If you need help in the use of APL2, you can follow the procedure''       °
  273.  ' '''described earlier in this lesson:'',r' ''' 1. Press Ctrl Esc'''          °
  274.   ''' 2. Select APL2 for OS2, icon view '''                                    °
  275.   ''' 3. Click on the icon with the type of information you need'''            °
  276.   ''' 4. When finished use the same procedure to get back to the Session       °
  277.   Manager.''' 'do'                                                             °
  278.   '''This completes the instructions on using APL2OS2. To start learning       °
  279.  '''                                                                           °
  280.   '''about APL2, place the APL2OS2 tutorials diskette on your A: disk, a       °
  281.  nd''' '''enter (assuming you defined your A diskette as LIB 10)'',r'          °
  282.   '''     )LOAD 10 TEACH1A'',r'                                                °
  283.   '''NOTE: If the tutorial files are in the ATF format (that is when you       °
  284.  '''                                                                           °
  285.   '''      enter )LIB 10, you get a listing of the form TEACH1.ATF...),'       °
  286.  ''                                                                            °
  287.   '''      then the procedure for loading a tutorial is a s follows:'''        °
  288.   '''    1. Enter: )CLEAR       --To get a clear workspace'''                  °
  289.   '''    2. Enter: )IN TEACH..A     --Instead of )LOAD TEACH..A'''             °
  290. X '''    3. Enter: TEACH        --To start the lesson''' 'endd'                °
  291. *(1997 8 22 11 58 18 536)                                                      °
  292.  FTEACH2 ÉFX 'TEACH2' 'Σ  Defining new libraries'                              °
  293.   '''Move the pointer to the end of a line, say the one that reads'''          °
  294.   '''SET APL00002=C:... and press ENTER. A blank line will appear below.       °
  295.  ''' '''On this new line type:'',r' '''SET APL00012=C:\MINE'',r'               °
  296.   '''Also do not forget to define your diskette as a library. Assuming t       °
  297.  hat'''                                                                        °
  298.   '''your diskette resides on the A disk, and assuming you wish to call        °
  299.  it''' '''library #10, you would enter the following line:'',r'                °
  300.   '''SET APL00010=A:''' 'do'                                                   °
  301.   '''(You may wish to enter more library numbers in this manner, but be        °
  302.  sure'''                                                                       °
  303.   '''that the named directories already exist.) At this time you may als       °
  304.  o'''                                                                          °
  305.   '''wish to review the list of Environment variables (p. 17 of User''''       °
  306.  s Guide).'''                                                                  °
  307.   '''However, unless there is a specific need, the default values should       °
  308.   be'''                                                                        °
  309.   '''adequate. Then, when you have finished, click on the FILE pull down       °
  310.  ''' '''menu, press SAVE and exit from the System Editor.'',r'                 °
  311.   '''To get back to APL2, click on the "Window list" button (Alternately       °
  312.   to'''                                                                        °
  313.   '''get the "Window list" press CTL-ESC. You will have to do that from        °
  314.  APL2),'''                                                                     °
  315.   '''then double click on the APL2 Session Manager line. Remember that y       °
  316.  our'''                                                                        °
  317.   '''newly defined libraries (such as 10 and 12) will not become active        °
  318.  until''' '''the next time you load APL2OS2.''' 'do'                           °
  319.   '''APL2 INVOCATION'',r'                                                      °
  320.   '''You may also wish to modify the invocation by adding keywords to th       °
  321.  e'''                                                                          °
  322.   '''"AOSAPL2.EXE" command (next to the last line of APL2OS2.CMD). There       °
  323.   is,'''                                                                       °
  324.   '''however, a better way to introduce parameters to AOSAPL2.EXE. If yo       °
  325.  u'''                                                                          °
  326.   '''plan to invoke APL2 by double clicking on the red APL2 icon, you ca       °
  327.  n'''                                                                          °
  328.   '''modify the way it invokes APL2. The procedure is quite simple, but'       °
  329.  '' '''again, requires a number of steps:'',r'                                 °
  330.   '''Look over pages 15-16 of your User''''s Guide. Let us assume that y       °
  331.  ou'''                                                                         °
  332.   '''have decided to always use the "-ws 2m,7m" option to specify your''       °
  333.  '                                                                             °
  334.   '''workspace size. You may also wish to provide for an optional entry        °
  335.  of''' '''one or more additional keywords. Here is how to proceed:'''          °
  336.   'do'                                                                         °
  337.   '''  1. As before, minimize the APL2 Session Manager by clicking on th       °
  338.  e''' '''     small square in the upper right corner'''                        °
  339.   '''  2. Point to the red APL2 icon, and click on the RIGHT button. A p       °
  340.  ull''' '''     down menu will appear.'''                                      °
  341.   '''  3. Select the line that reads SETTINGS. This will produce the fir       °
  342.  st'''                                                                         °
  343.   '''     of several pages defining the manner in which APL2 will behave       °
  344.  '''                                                                           °
  345.   '''  4. The first page has three boxes. Ignore the one labelled Pathna       °
  346.  me.'''                                                                        °
  347.   '''     Move the pointer to the one labelled Optional Parameters and''       °
  348.  ' '''     click on it. Then enter:  -ws 2m,7m []'''                           °
  349.   '''      (ws -2m,7m will give you initially a WS size of 2 megs, and w       °
  350.  hen'''                                                                        °
  351.   '''      that gets full will increment it by 7 megs. The brackets [] w       °
  352.  ill'''                                                                        °
  353.   '''      cause a small window to appear each time you start APL2, wher       °
  354.  e'''                                                                          °
  355.   '''      you will be able to enter additional invocation parameters.)'       °
  356.  ''                                                                            °
  357.   '''  5. Double click on the upper left corner to close the SETTINGS bo       °
  358. Xx''' 'endd'                                                                   °
  359. *(1997 8 22 11 58 25 564)                                                      °
  360.  FTEACH3 ÉFX 'TEACH3' 'Σ  Associated Windows'                                  °
  361.   '''Now that you have initialized APL2 on your system, let us take a lo       °
  362.  ok'''                                                                         °
  363.   '''at the OS2 environment. Your APL2 Session Manager has the following       °
  364.  ''' '''labels on the pull-down menu list:'',r'                                °
  365.   '''  Log'',r,''  Edit'',r,''  Signals'',r,''  Options'',r,''  Windows'       °
  366.  ',r,''  Help''' 'do' '''THE SESSION LOG'',r'                                  °
  367.   '''You will note that the title of the APL2 window is "APL2 Session'''       °
  368.   '''Manager". This window is a partial view of a file called the Sessio       °
  369.  n'''                                                                          °
  370.   '''log. (The actual file name is not important now). You can scroll'''       °
  371.   '''the screen, change its size, move it around, and "minimize" it.'''        °
  372.   '''When you click on the "Log" pull-down menu, you will see a list of'       °
  373.  '' '''options dealing with your APL2 SESSION.'',r'                            °
  374.   '''There are three parts to this list. The first part deals with the''       °
  375.  '                                                                             °
  376.   '''Session log file(s). You can save this file, rename it, erase it,''       °
  377.  ' '''change its size and delete portions of it.'',r'                          °
  378.   '''The second portion of the "Log" pop up menu provides a way to quit'       °
  379.  '' '''APL2. It is equivalent to the )OFF System Command.'',r'                 °
  380.   '''The last portion of the "Log" pull-down menu allows you to print al       °
  381.  l'''                                                                          °
  382.   '''or parts of the session. The "Print Setup..." gives you the ability       °
  383.  '''                                                                           °
  384.   '''to select the printer. The third option wil print the entire conten       °
  385.  ts'''                                                                         °
  386.   '''of the Session log. (Not recommended if your Session file is large)       °
  387.  '''                                                                           °
  388.   ''' It is the second option, however, that may be most useful. It allo       °
  389.  ws''' '''you to print selected portions of the log.''' 'do'                   °
  390.   '''Before we leave this section, consider trying the following exercis       °
  391. Xe:''' 'testlog' 'endd'                                                        °
  392. *(1997 8 22 11 58 34 600)                                                      °
  393.  FTEACH4 ÉFX 'TEACH4' '''  SESSION EDITOR'',r'                                 °
  394.   '''When you click on the "Edit" pull-down menu, only three of the 7'''       °
  395.   '''options are highlighted:'',r'                                             °
  396.   '''Paste'',r,''Find'',r,''Open Object...'',r'                                °
  397.   '''You will also notice that the seven options fall into four separate       °
  398.  ''' '''partitions:'',r' '''              Copy'''                              °
  399.   '''   Cut        Paste            Find     Open Object...'''                 °
  400.   '''              Delete Marked''' '''              Unmark all'',r'           °
  401.   '''Obviously in order to "Cut" "Copy" "Delete" or "Unmark" blocks of''       °
  402.  ' '''data, one has to first mark it.''' 'do'                                  °
  403.   '''There are two ways of marking lines:'''                                   °
  404.   ''' 1) Place the mouse at the line to be marked, then press the left''       °
  405.  '                                                                             °
  406.   '''    button and move the mouse to the left or right. The line will''       °
  407.  '                                                                             °
  408.   '''    become highlighted. If the mouse is also moved up or down, a'''       °
  409.   '''    block of lines may be so highlighted. Marked blocks need not'''       °
  410.   '''    be continuous. Marking an already highlighted line or block wil       °
  411.  l''' '''    "unmark" it.'''                                                   °
  412.   ''' 2) Another way to mark lines is to place the cursor on the line'''       °
  413.   '''    BELOW (or ABOVE) the line to be marked, and by pressing the SHI       °
  414.  FT''' '''    and the UP or DOWN arrow.'',r'                                   °
  415.   '''Once text or APL expressions have been highlighted, they can be'''        °
  416.   '''erased or copied. To see how this works, try the following exercise       °
  417.  :''' 'tested'                                                                 °
  418.   '''The "Find" option on the Edit menu allows you to search for specifi       °
  419.  c'''                                                                          °
  420.   '''character strings. The search always proceeds from the current plac       °
  421.  e'''                                                                          °
  422.   '''of the prompt. You can not only specify the string to be found,'''        °
  423.   '''but also give a replacement string. The buttons allow you to search       °
  424.  '''                                                                           °
  425.   '''forward or backwards. You can replace a specific string wherever'''       °
  426.   '''it ocurrs, you can ignore case, and you can search only for APL nam       °
  427.  es.'''                                                                        °
  428.   '''Try the following exercise to get acquainted with this feature:'',r       °
  429. X' 'testfi' 'endd'                                                             °
  430. *(1997 8 22 11 58 44 640)                                                      °
  431.  FTEACH5 ÉFX 'TEACH5' 'Σ  Opening an APL2 object'                              °
  432.   '''  The last item on the Edit pull down menu provides a way to edit''       °
  433.  '                                                                             °
  434.   '''APL2 objects. We will postpone describing the process until after''       °
  435. X' '''we have covered some aspects of APL2 in the tutorials.''' 'endd'         °
  436. *(1997 8 22 11 58 53 676)                                                      °
  437.  FTEACH6 ÉFX 'TEACH6;LOOP' 'Σ  Signals pull down menu'                         °
  438.   '''THE SIGNALS MENU'',r'                                                     °
  439.   '''If, as it happens occasionally, something goes wrong while you are'       °
  440.  ''                                                                            °
  441.   '''doing APL2, you will want to interrupt the APL2 processing. This ca       °
  442.  n'''                                                                          °
  443.   '''best be done using the SIGNALS pull down menu. Here again, we will'       °
  444.  ''                                                                            °
  445.   '''postpone discussion of this subject until such time you learn about       °
  446. X''' '''using APL2.''' 'Σdo' 'Σtestsi' 'endd'                                  °
  447. *(1997 8 22 11 59 2 476)                                                       °
  448.  FTEACH7 ÉFX 'TEACH7' 'Σ  Options pull down menu'                              °
  449.   '''THE OPTIONS MENU'',r'                                                     °
  450.   '''The next pull down menu is called "Options". It allows you to modif       °
  451.  y'''                                                                          °
  452.   '''the behavior of your keyboard, and the Session Manager window. You'       °
  453.  ''                                                                            °
  454.   '''should test out the available options in the following exercises'''       °
  455.   '''even if you are satisfied with the installed setup defaults.'''           °
  456.   'do' '''APL On'',r'                                                          °
  457.   '''There is a toggle switch that allows you to make the keyboard behav       °
  458.  e'''                                                                          °
  459.   '''as either APL2 or ASCII. You can activate this toggle switch by one       °
  460.   of''' '''two ways:'',r'                                                      °
  461.   ''' 1. by simultaneously pressing Ctl and Backspace'''                       °
  462.   ''' 2. by marking the "APL On" line on the Options pull down menu'',r'       °
  463.   '''Look at the bottom line of the Session Manager window. Is there a''       °
  464.  '                                                                             °
  465.   '''line containing: "Input [APL]? (If not, press on the bigger square        °
  466.  on''' '''the upper right corner of the Session Manager window.)'',r'          °
  467.   '''Select the "Options menu" and remove the check mark from the'''           °
  468.   '''"APL On" line. The "[APL]" will disappear from the bottom line,'''        °
  469.   '''meaning that the keyboard is now an ASCII keyboard. To return to th       °
  470.  e'''                                                                          °
  471.   '''APL font place a check mark on the "APL On" line of the Options men       °
  472.  u,''' '''or just press Ctl AND Backspace.''' 'do'                             °
  473.   '''FOR NOW BE SURE THERE IS A CHECK MARK ON THE "APL ON" LINE!'''            °
  474. X 'endd'                                                                       °
  475. *(1997 8 22 11 59 9 504)                                                       °
  476.  FTEACH8 ÉFX 'TEACH8' 'Σ  Keyboards' '''CUSTOMIZING KEYBOARDS'',r'             °
  477.   '''There are on the market a variety of keyboards. When you installed'       °
  478.  ''                                                                            °
  479.   '''APL2OS2 the process may not have defined the layout of the keys the       °
  480.  '''                                                                           °
  481.   '''way as they are shown on your keyboard. The line "Select Keyboard"'       °
  482.  ''                                                                            °
  483.   '''gives you the capability to re-define your keyboard to one of sever       °
  484.  al'''                                                                         °
  485.   '''common standards. When you select "Select Keyboard", a window named       °
  486.  '''                                                                           °
  487.   '''"Keyboard Layout Selection" appears. A window within this window'''       °
  488.   '''called "Layout Names" displays a list of available layouts.'',r'          °
  489.   '''The current setting is highlighted in this window. For example,'''        °
  490.   '''select the line labelled "APL2 Union with European Characters", the       °
  491.  n'''                                                                          °
  492.   '''press OK. Now hold Alt down, and press in turn the keys for Q,P and       °
  493.   M.'''                                                                        °
  494.   '''You should see characters used in writing Spanish. To return back t       °
  495.  o'''                                                                          °
  496.   '''APL2, select "Select Keyboard" again and this time highlight the'''       °
  497.   '''keyboard option "APL2 Union with Box Characters".''' 'do'                 °
  498.   '''Suppose now, that your keyboard does not fit the pattern of any one       °
  499.  '''                                                                           °
  500.   '''of the available layouts. You can not only inspect what characters'       °
  501.  ''                                                                            °
  502.   '''are associated with your current keyboard, but you can even design'       °
  503.  '' '''your own layout.'',r'                                                   °
  504.   ''' All of this is possible if you select the "Modify Keyboard" option       °
  505.  .'''                                                                          °
  506.   '''When you select "Modify Keyboard ...", a new window called the'''         °
  507.   '''"Keyboard Layout Modification" appears. On the left side there is a       °
  508.  '''                                                                           °
  509.   '''keyboard display (6 pages) showing all the possible characters that       °
  510.  '''                                                                           °
  511.   '''are available to you. At the top right an option window displays th       °
  512.  e''' '''current layout name.'',r'                                             °
  513.   '''(You can look at other layout names by pressing the button to the''       °
  514.  ' '''right of this window, and selecting other names.)'',r'                   °
  515.   '''In fact, do the following exercise: Select in turn each of the'''         °
  516.   '''layout names, and then inspect the keyboard layout (displayed on th       °
  517.  e'''                                                                          °
  518.   '''window)for each of the four states: Base, Shift, Ctrl and Alt. (You       °
  519.  '''                                                                           °
  520.   '''select the state by pressing the appropriate button on the "State"'       °
  521.  '' '''panel.)''' 'do'                                                         °
  522.   '''Even if you are an accomplished user of APL, there may come a time'       °
  523.  ''                                                                            °
  524.   '''when you may not recall what key to press to get a specific APL2'''       °
  525.   '''symbol. The "Modify Keyboard" option lets you see quickly the'''          °
  526.   '''keyboard layout for any of the 4 keyboard states: BASE SHIFT CTRL''       °
  527.  ' '''and ALT.''' 'do'                                                         °
  528.   '''Now that you have become familiar with what is available, suppose t       °
  529.  hat'''                                                                        °
  530.   '''you desire to design your own keyboard. To do that, select the "Add       °
  531.  "'''                                                                          °
  532.   '''button. Then enter the name of the keyboard of your own design on t       °
  533.  he'''                                                                         °
  534.   '''"Add New Layout" window and press OK. A copy of your current keyboa       °
  535.  rd'''                                                                         °
  536.   '''will be transferred to your layout. To modify your own keyboard,'''       °
  537.   '''select a character from the keyboard display table by clicking on i       °
  538.  t,'''                                                                         °
  539.   '''and then select the key where that characte is to be placed. Contin       °
  540.  ue'''                                                                         °
  541.   '''this process until you have satisfied your requirements. You save t       °
  542.  he'''                                                                         °
  543.   '''newly defined keyboard layout by pressing the "Apply" button.'''          °
  544. X 'endd'                                                                       °
  545. *(1997 8 22 11 59 18 540)                                                      °
  546.  FTEACH9 ÉFX 'TEACH9' 'Σ  Setting up fonts' '''SETTING UP FONTS'',r'           °
  547.   '''The choice of characters on the "Characters Notebook" of the "Modif       °
  548.  y'''                                                                          °
  549.   '''Keyboard" option can be changed by selecting different fonts.'',r'        °
  550.   '''Of course as long as you plan to use APL2, your choice of fonts is'       °
  551.  ''                                                                            °
  552.   '''limited to those that support the special APL symbols. If, however,       °
  553.  '''                                                                           °
  554.   '''you have an application that does not use APL2 symbols, you can sel       °
  555.  ect'''                                                                        °
  556.   '''any one of the many fonts supported by your Operating System.'',r'        °
  557.   '''When you select the "Font..." option, a "Font" window will appear o       °
  558.  n'''                                                                          °
  559.   '''your screen. There are four fields on this window (Name, Size, Styl       °
  560.  e''' '''and Sample).'',r' '''Name'''                                          °
  561.   '''  This field contains the font name that is currently active. If yo       °
  562.  u'''                                                                          °
  563.   '''press the button at the right of this field, you will see a listing       °
  564.   of'''                                                                        °
  565.   '''other fonts supported by OS2. Marking any one of these names will m       °
  566.  ark'''                                                                        °
  567.   '''this font as a possible change. The box labelled "Sample" will disp       °
  568.  lay'''                                                                        °
  569.   '''a sample text in that font. To select the font, press the "Apply"''       °
  570.  ' '''button.''' 'do' '''Size'''                                               °
  571.   '''  This window displays a measure of the size of the characters. To'       °
  572.  ''                                                                            °
  573.   '''see how this works, mark the button at right and then select some''       °
  574.  '                                                                             °
  575.   '''numbers from the list. The Sample window will display the text in t       °
  576.  he''' '''selected sizes.''' 'do' '''Style'''                                  °
  577.   '''  The Style window may or may not provide one or more styles depend       °
  578.  ing'''                                                                        °
  579.   '''on the font. If the font supports both the "Normal" and "Bold" styl       °
  580.  es,'''                                                                        °
  581.   '''you can see best the difference on a large size (e.g. 24). By the w       °
  582.  ay,''' '''the font named "Helvetica" supports four distinct styles.'''        °
  583.   'do'                                                                         °
  584.   '''If you have selected a font a size and/or a style that you prefer,'       °
  585.  ''                                                                            °
  586.   '''select the "Apply" button. Pressing the "Reset" button will return'       °
  587.  ''                                                                            °
  588.   '''to the original font/size/style. Pressing the OK button will change       °
  589. X''' '''the setup of the setting and end the "Font" window.''' 'endd'          °
  590. *(1997 7 13 12 28 49 504)                                                      °
  591.  Faddquote ÉFX 'u╜addquote w'                                                  °
  592.   'Σ Put quotes around a string, and double existing quotes'                   °
  593. X 'u╜ÉAV[40],((1+w=ÉAV[40])/w),ÉAV[40]'                                        °
  594. *(1991 11 11 8 25 11 308)                                                      °
  595. XFaq ÉFX 'u╜aq w' 'Σ Enclose quoted string' 'u╜Γaddquote w'                    °
  596. *(1997 7 24 13 20 38 476)                                                      °
  597.  Fav ÉFX 'av;A;N;I;ÉIO' 'Σ Display characters in ÉAV' 'ÉIO╜0'                  °
  598.   'A╜22 78µ'' ''' 'N╜3 0«φ12 22µ1+∞356' 'A[;,(6⌡∞12)°.+2 3 4]╜N'               °
  599.   'A[;6+6⌡∞12]╜φ12 22µÉAV' 'ΣA[8 10 13;6]╜'' ''' 'A[13;6]╜'' '''               °
  600. X 'A[14+∞8;68 69 70 72]╜'' ''' 'A'                                             °
  601. *(1997 7 29 12 45 59 676)                                                      °
  602.  Fcopyright ÉFX 'copyright' 'Σ Copyright statement'                            °
  603.   '(10µ'' ''),''Copyright, Z. V. Jizba, 1995'',r'                              °
  604.   '''This and subsequent workspaces labelled TEACHxxA are made available       °
  605.  '''                                                                           °
  606.   '''at no cost to anyone who desires to learn how to use effectively'''       °
  607.   '''the IBM/OS2 version of APL2.'',r'                                         °
  608.   '''This software is provided "AS IS" with no WARRANTY of any kind, eit       °
  609.  her'''                                                                        °
  610.   '''express or implied. Any risk in its use resides with you, the user        °
  611. Xof''' '''these tutorials.''' '''(PRESS ENTER to continue)''' 'do'             °
  612. *(1991 11 11 8 25 13 316)                                                      °
  613.  Fdate ÉFX 'u╜date w' 'Σ Format date and time of day' 'u╜«6╞w'                 °
  614. X 'u╜('' ''⌠u)Γu' 'u╜εu,■''-- .. '''                                           °
  615. XCdig 1 10 1234567890                                                          °
  616. *(1997 7 13 12 28 50 508)                                                      °
  617.  Fdo ÉFX 'do;T;E' 'Σ Expression driver' 'E╜''''' 'æ╜''      ''' 'T╜æ'          °
  618.   '╕(^/'' ''=T)/0'                                                             °
  619.   '╕(('':''εT)doif ''B╜evaldd (+/^\'''' ''''=T)╟T'')/2'                        °
  620.   '''E╜ÉEM'' ÉEA T' '╕(0=µ,E)/2'                                               °
  621.   '''This is not a valid APL2 expression''' 'æ╜''*''' '╕(''?''⌠╞1╟æ)/2'        °
  622. X 'E' '╕2'                                                                     °
  623. *(1997 7 13 12 28 50 508)                                                      °
  624.  Fdoif ÉFX 'U╢╜V╢ doif W╢;t╢' 'Σ Rule' '╕(^/~U╢╜V╢)/0'                         °
  625. X '''U╢╜V╢ doif■ W╢'' ÉEA ''»V╢/W╢'''                                          °
  626. *(1997 7 31 13 40 25 532)                                                      °
  627. XFendd ÉFX 'endd' 'Σ end of special feature' '20µ''²''' 'do'                   °
  628. *(1997 8 22 11 57 24 556)                                                      °
  629.  Ferase ÉFX 'erase;t;DISPLAY;DOS;GO;SVOFFER;HELP;EXIT' 't╜ÉNL 3'               °
  630.   't╜(~t^.εlc,'' '')≡t' 't╜ÉEX(~t[;∞5]^.=''TEACH'')≡t' 't╜ÉNL 2'               °
  631. X 't╜ÉEX(~t^.εlc,'' '')≡t' 't╜ÉNL 4' 't╜ÉEX(~t^.εlc,'' '')≡t'                  °
  632. *(1997 7 27 13 47 41 608)                                                      °
  633.  Fevaldd ÉFX 'u╜evaldd w;c;n' 'Σ Evaluate direct definition' 'u╜0'             °
  634.   'n╜(w∞''Σ'')-1' 'c╜(((n╞w)⌠'':'')Γn╞w),Γ''ΣDD '',(n+1)╟w'                    °
  635.   '╕((1 label╞c)doif ''''''Invalid label'''''')/0'                             °
  636.   '╕((2=µc)doif ''u╜showdd 1╙c'')/0'                                           °
  637.   '╕((3=ÉNC╞c)doif ''u╜⌡µÉ╜(╞c),'''' is already defined.'''''')/0'             °
  638.   '╕((3=µc)doif ''u╜simdd c'')/0' 'c╜(Γ''α∙ aw'')replace■c'                    °
  639.   'u╜ε''u╜'',((''a''εεc[2 3 4])/''a ''),(╞c),'' w;t;b'''                       °
  640.   'u╜u(5πc)(''b╜(t╜'',(3πc),'')/'',addquote ''u╜'',4πc)'                       °
  641. X 'u╜u,''╕(t doif b)/0''(''u╜'',2πc)' 'u╜╧ÉFX u'                               °
  642. *(1997 9 12 12 41 21 448)                                                      °
  643.  Fexa ÉFX 'exa' 'Σ OS2 exercise' '''OS/2 EXERCISE'',r'                         °
  644.   '''Before discussing APL, it is useful to do an exercise using the mou       °
  645.  se''' '''to switch between APL2 and the desktop'',r'                          °
  646.   '''In the upper right hand corner of the APL2 Session Manager window,'       °
  647.  ''                                                                            °
  648.   '''there are two buttons. The one with the small square will "minimize       °
  649.  "'''                                                                          °
  650.   '''this window. Before you try it, be sure to write down the following       °
  651.  ''' '''steps (so you can return back to APL2 quickly):'',r'                   °
  652.   ''' 1. Click on the "minimize" button. (The APL2 window will disappear       °
  653.  )'''                                                                          °
  654.   ''' 2. Click on the "Window list". a "Window list" window will appear.       °
  655.  '''                                                                           °
  656.   '''    This list has the names of all active windows (whether they are       °
  657.  ''' '''    visible or not).'''                                                °
  658.   ''' 3. Click on the line "APL2 Session Manager". This will return you'       °
  659.  '' '''    back to APL''' 'do'                                                 °
  660.   '''Remember these steps. They may be useful to you whenever you will''       °
  661. X' '''want to switch between APL2OS2 and other software''' 'endd'              °
  662. *(1997 7 25 13 27 52 564)                                                      °
  663.  Fexit ÉFX 'V exit W;T' 'Σ Exit if too many suspended functions'               °
  664.   '╕(0⌠ÉNC ''V'')/L0 ╪ V╜10' 'L0:╕(V>µÉLC)/0'                                  °
  665.   '''There are too many suspended functions''' '''Please enter '',W'           °
  666. X '╕'                                                                          °
  667. *(1992 8 16 11 27 52 504)                                                      °
  668.  Ffkeys ÉFX 'fkeys W;B;T' 'Σ Display currenttly defined fkeys'                 °
  669.   'B╜~^/W=ÉAV[1]'                                                              °
  670.   '╕((^/B)doif ''''''Currently no F keys are defined'''''')/0'                 °
  671.   '''The following Fkeys are currently defined (r stands for ÉAF 0)'',r'       °
  672. X 'T╜(r,'' r'')replace W' '0 tab B≡(π«■∞30),'' '',T'                           °
  673. *(1997 7 26 12 33 39 536)                                                      °
  674.  Fget ÉFX 'U╜V get W;t;T;ÉPR' 'Σ Prompt for response from keyboard'            °
  675.   'ÉPR╜T╜ÉAV[ÉIO+255] ╪ ╕(0⌠ÉNC ''V'')/L0 ╪ V╜1' 'L0:V╜V╧1' 'æ╜W ╪ t╜æ'        °
  676.   'U╜(+/^\t=T)╟t' '╕(''╕''⌠╞U)/L1 ╪ ╕' 'L1:╕V/0' 't╜(U⌠'' '')ΓU'               °
  677. X 'U╜(µt),(ΓU),t'                                                              °
  678. *(1997 7 28 13 33 8 424)                                                       °
  679.  Fglobals ÉFX 'globals' 'Σ Initialize useful global variables'                 °
  680.   'uc╜''ABCDEFGHIJKLMNOPQRSTUVWXYZ'''                                          °
  681.   'lc╜''abcdefghijklmnopqrstuvwxyz''' 'dig╜''1234567890'''                     °
  682. X 'r╜ÉAV[13+ÉIO]' 'q╜'''''''''                                                 °
  683. *(1996 3 28 16 45 40 592)                                                      °
  684.  Fhelp ÉFX 'help'                                                              °
  685.   '''If you feel that a single linear reading of these lessons is not th       °
  686.  e'''                                                                          °
  687.   '''best way to lear about APL2OS2, you may try to do the following.'',       °
  688.  r' '''1. At any pause enter: ÉCR ''''TEACH'''''''                             °
  689.   '''   (a listing of the components of the tutorial workspace will appe       °
  690.  ar)'''                                                                        °
  691.   '''2. Jot down the names that appear in UPPER CASE --mostly TEACHxx--'       °
  692.  ''                                                                            °
  693.   '''3. Each of these is a component of the lesson that can be invoked''       °
  694.  '                                                                             °
  695.   '''   at the pause simply by entering its name. This will repeat that'       °
  696.  ''                                                                            °
  697.   '''   portion of the tutorial. The completion of each portion is marke       °
  698. Xd''' '''   by a line containing ²².''' 'end'                                  °
  699. *(1997 7 31 13 9 28 420)                                                       °
  700.  Finitialize ÉFX 'initialize;T' 'Σ Initialize workspace' 'globals'             °
  701.   '''AT ALL TIMES, TO CONTINUE, PRESS RETURN!'',r'                             °
  702.   'Σ''To see disclaimers enter:'',r,''    disclaimer''' 'do' 'erase'           °
  703.   '''Make sure the CAP LOCK light on your keyboard (upper right) is ON!'       °
  704. X'' 'endd'                                                                     °
  705. *(1997 7 27 13 14 33 444)                                                      °
  706.  Flabel ÉFX 'u╜v label w'                                                      °
  707.   'Σ Return 1 if label w does not begin with a cap'                            °
  708.   '╕(0⌠ÉNC ''v'')/L0 ╪ v╜0' 'L0:v╜v╧1 ╪ w╜εw ╪ ╕v/L1 ╪ ╕(u╜0⌠ÉNC w)/0'         °
  709. X 'L1:╕(u╜~^/wεlc,uc,dig)/0' 'u╜w[1]εlc,dig'                                   °
  710. XClc 1 26 abcdefghijklmnopqrstuvwxyz                                           °
  711. *(1997 7 13 12 28 55 528)                                                      °
  712.  Fnon ÉFX 'non;T;RC;ET;R' 'Σ Ignore keyboard entry' 'æ╜''      ''' 'T╜æ'       °
  713.   '╕(0=µ(T⌠'' '')/T)/0' '(RC ET R)╜ÉEC T' '╕(0=RC)/2'                          °
  714. X '╕((1=RC)doif ''R'')/2' '╕2'                                                 °
  715. *(1997 7 13 12 28 55 528)                                                      °
  716.  Fnotb ÉFX 'u╜notb w' 'Σ Remove trailing blanks'                               °
  717.   '╕((1<╧w)doif ''u╜notb■ w'')/0' '╕((1<µµw)doif ''u╜πnotb Γ[2]w'')/0'         °
  718. X 'u╜(1-(,'' ''⌠Φw)∞1)╟w'                                                      °
  719. *(1991 11 11 8 25 12 312)                                                      °
  720.  Fpause ÉFX 'v pause w;t'                                                      °
  721.   'Σ Pause, then print w v spaces right and return'                            °
  722. X 't╜(0=ÉNC ''v'')doif ''v╜6''' 'do' '(vµ'' ''),w' 'do'                        °
  723. *(1997 7 27 12 55 6 496)                                                       °
  724.  Fproblems ÉFX 'problems' 'Σ Problems'                                         °
  725.   '''That is all for this lesson. Remember, if you want to practice,'''        °
  726.   '''and plan to use direct definitions, be sure to first enter GO.'''         °
  727.   '''Direct definitions will then be accepted. To exit GO, enter EXIT.''       °
  728.  ,r'                                                                           °
  729.   '''To erase a previously defined DIRECT DEFINITION FUNCTION, enter'',r       °
  730.  ' '''       )ERASE functionname'',r'                                          °
  731. X '''WARNING! do not use )ERASE on other labels.'',r'                          °
  732. XCq 0 '                                                                        °
  733. XCr 0                                                                         °
  734. *(1997 7 13 12 28 56 532)                                                      °
  735.  Freplace ÉFX 'u╜v replace u;i;r;s' 'Σ Replace elements in v in u'             °
  736.   'i╜Γ∞µu' 's╜2πv╜(v⌠'' '')Γv' 'i╜⌡r╜i⌡■Γ[1]u°.=╞v'                            °
  737. X 'u[(εi)/εr]╜s[(εi)/εi⌡■∞µs]'                                                 °
  738. *(1997 7 13 12 28 56 532)                                                      °
  739.  Fround ÉFX 'U╜V round W' 'Σ Half adjust to V th decimal'                      °
  740. X 'U╜(╛0.5+W⌡10*V)÷10*V'                                                       °
  741. *(1997 7 13 12 28 57 536)                                                      °
  742.  Fshow ÉFX '╢V show ╢W;╢T;╢B' 'Σ Display and execute ╢W'                       °
  743.   '╢T╜(0=ÉNC ''╢V'')doif ''╢V╜0'''                                             °
  744.   '╕((0=╧╢W)doif ''show ╢W,'''' '''''')/0'                                     °
  745.   '╕((1<╧╢W)doif ''╢V show ■╢W'')/0' '''      '',╢W'                           °
  746. X '╕((╢V^'':''ε╢W)doif ''╢T╜evaldd ╢W'')/L0' '''ÉEM'' ÉEA ╢W' 'L0:do'          °
  747. *(1997 7 13 12 28 57 536)                                                      °
  748.  Fshowdd ÉFX 'u╜showdd w;a;b;c;r'                                              °
  749.   'Σ Display a direct definition function'                                     °
  750.   '╕((1=╧w)doif ''u╜showdd Γw'')/u╜0'                                          °
  751.   '╕((3⌠ÉNC╞w)doif ''(ε╞w),'''' is not a function'''''')/0'                    °
  752.   'c╜Γ[2]ÉCR╞w' 'c╜notb(2╞c),(Γ''aw α∙'')replace■2╟c'                          °
  753.   '╕((~''ΣDD''╧3╞2πc)doif ''''''Not a direct definition function'''''')/       °
  754.  0' 'u╜1' 'b╜('' ''⌠╞c)Γ╞c' 'a╜''      ''' 'r╜2╟3πc'                           °
  755.   '╕((3=µc)doif ''a,(╞w),'''':'''',r,(3<µ2πc)/''''   Σ'''',3╟2πc'')/0'         °
  756.   'a╜a,(╞w),'':'',(2╟5πc),'':''' 'b╜(+\r=''('')-+\r='')''' 'b╜b∞0'             °
  757. X 'a╜a,(²3╟(b-1)╞3╟r),'':'',2╟»(b+2)╟r' 'a,(3<µ2πc)/''  Σ'',3╟2πc'             °
  758. *(1997 7 13 12 28 57 536)                                                      °
  759.  Fshowfn ÉFX 'U╜V showfn W;F;N;T;ÉIO' 'Σ Simulate ╖W[É]'                       °
  760.   'T╜(0=ÉNC ''V'')doif ''V╜0''' 'ÉIO╜0'                                        °
  761.   'U╜r,''      '',''╖'',W,''[É]'',(╞V)╞''╖''' 'N╜1╞µF╜ÉCR W' 'N╜«∞N'           °
  762.   'N╜(N⌠'' '')ΓN' 'F╜(π''['',■N,■Γ''] ''),F'                                   °
  763.   'T╜(1<µ,V)doif ''F╜F[1╟V;]'' ''U╜''''''''''' 'U╜²1╟U,r,,F,r'                 °
  764. X 'U╜((-+/^\'' ''=ΦU)╟U),('' ╖'')[╞V],r'                                       °
  765. *(1997 7 13 12 28 58 540)                                                      °
  766.  Fsimdd ÉFX 'u╜simdd w;e' 'Σ Direct definition mode' 'u╜0'                     °
  767.   '╕((0⌠ÉNC╞w)doif ''''''Already defined'''''')/0' 'e╜''α''ε2πw'               °
  768.   'w[2]╜Γ''u╜'',''α∙ aw'' replace 2πw' 'w╜w[1 3 2]'                            °
  769. X 'w[1]╜Γε''u╜'',(e/''a ''),w[1],'' w''' 'u╜╧ÉFX w'                            °
  770. *(1992 6 3 9 59 17 424)                                                        °
  771.  Ftab ÉFX 'U╜V tab W;T;A;B;C;D;E;F;G;M;ÉPW' 'Σ Tabulate list W'                °
  772.   'T╜(0=ÉNC ''V'')doif ''V╜0''' 'M╜''Invalid data for tabulation'''            °
  773.   'V╜4╞V' 'ÉPW╜130╛30⌐G╜V[2]+79⌡V[2]=0'                                        °
  774.   'L1:╕((1<╧W)doif ''''''W╜∞0'''' ÉEA ''''W╜πW'''''')/L1'                      °
  775.   '╕(((0=µεW)δ2<µµW)doif ''U╜(~V╧4╞0)/M'')/0'                                  °
  776.   'T╜(1≥µµU╜«W)doif ''U╜πW╜(U⌠'''' '''')ΓU'''                                  °
  777.   'T╜(0<V[1])doif ''U╜(«(Φ1,╞µW)µ(V[3]µ'''' ''''),∞(╞µW)-V[3]),'''' ''''       °
  778.  ,U''' '╕(G<30)/0' 'T╜(F╜µεV[4])+C╜1╟B╜µA╜(V[3],0)╟U'                          °
  779.   'T╜⌐(1╞B)÷1⌐╛(ÉPW+F)÷T' 'U╜(E╜(V[3],C)╞U),[1](B╜T,1╟B)╞A'                    °
  780.   '''D╜εV[4]'' ÉEA ''D╜ÉAV[εV[4]+33⌡V[4]=0]''' 'L0:A╜(T,0)╟A'                  °
  781. X '╕(0=1╞µA)/0' 'U╜U,(((T+V[3]),µD)µD),E,[1]B╞A' '╕L0'                         °
  782. *(1997 7 13 12 28 59 544)                                                      °
  783.  Ftest ÉFX 'U╜V test W;P'                                                      °
  784.   'Σ Describe problem in W, (correct answer in V)' 'U╜2' 'L1:W'                °
  785.   'É╜''      ''' 'P╜æ' '''╕L0'' ÉEA ''P╜»P''' '╕(V╧P)/0'                       °
  786. X 'L0:╕(0=U╜U-1)/0' '''Incorrect. Try again''' '╕L1'                           °
  787. *(1992 12 19 18 32 12 420)                                                     °
  788.  Ftestap ÉFX 'U╜V testap W;B;D;S;T'                                            °
  789.   'Σ Test for existence of specific AP"s' 'D╜''D'',■«■W╜,W'                    °
  790.   'T╜W ÉSVO■D' 'U╜0' '╕((^/B╜2=ÉSVO■D)doif ''T╜ÉEX■ D'')/0'                    °
  791.   '╕(2=ÉNC ''V'')/L0'                                                          °
  792.   'T╜''The following Auxilliary Processor'',(S╜1<+/~B)╞''s'''                  °
  793.   'T,(ε(S+1)╙'' is'' '' are''),'' not available'',(~B)/W' 'L0:U╜1'             °
  794. X 'T╜ÉEX■D'                                                                    °
  795. *(1995 6 11 13 18 39 408)                                                      °
  796.  Ftested ÉFX 'tested' 'Σ Exercise the Edit pull down menu'                     °
  797.   '''First, mark one or more lines of the above text.'''                       °
  798.   ''' ( Since plain text is not executable by APL, be sure that the last       °
  799.  '''                                                                           °
  800.   '''   marked line is a blank one -- because it is the last line that A       °
  801.  PL''' '''   tries to evaluate.)''' 'do'                                       °
  802.   '''Select "Copy" from the Edit menu. The marked text will be stored in       °
  803.   a'''                                                                         °
  804.   '''buffer. Now place the pointer at the BOTTOM of the page and pull do       °
  805.  wn'''                                                                         °
  806.   '''the "Edit" menu again. This time select the "Paste" line. The selec       °
  807.  ted'''                                                                        °
  808.   '''text will be pasted at the pointer. Mark this pasted text again,'''       °
  809.   '''and this time select the "Cut" option from the pull down menu. The'       °
  810.  '' '''selected text will disappear.''' 'do'                                   °
  811.   '''In addition to the "Cut", "Copy" and "Paste", you should also try t       °
  812.  he'''                                                                         °
  813.   '''"Delete Marked", and the "Unmark all" options. Try to find the'''         °
  814. X '''difference between "Cut" and "Delete marked".''' 'do'                     °
  815. *(1997 9 14 12 21 49 488)                                                      °
  816.  Ftestfi ÉFX 'testfi' 'Σ Exercise the FIND option'                             °
  817.   '''Place the cursor at the top of the page, then select the "Find" opt       °
  818.  ion'''                                                                        °
  819.   '''from the "Edit" menu. A FIND window will appear on the screen. Ente       °
  820.  r'''                                                                          °
  821.   '''the string "CUT" on the "Find text:" line. Then press the FIND butt       °
  822.  on.'''                                                                        °
  823.   '''If you have followed these instructions, there should be a QUAD ove       °
  824.  r'''                                                                          °
  825.   '''the C of the word "CUT" above. Press FIND again. The QUAD moves to        °
  826.  the''' '''next ocurrence of the word.'',r'                                    °
  827.   '''Now click on the buttons labelled "Reverse search" and "Ignore case       °
  828.  "'''                                                                          °
  829.   '''and press again on the FIND button. Then press FIND button again. T       °
  830.  hen'''                                                                        °
  831.   '''press "cancel"- or the left mouse button outside the FIND window. (       °
  832.  The'''                                                                        °
  833.   '''QUAD will be replaced by the pointer, and the FIND window disappear       °
  834.  s.)''' 'do'                                                                   °
  835.   '''This time the search went backwards, and the QUAD was replaced by t       °
  836.  he''' '''pointer.'',r'                                                        °
  837.   '''To see how the replacement option works, move the pointer to the to       °
  838.  p'''                                                                          °
  839.   '''of the second last paragraph. Then open the FIND window fom the Edi       °
  840.  t menu'''                                                                     °
  841.   '''(note that its contents remain unchanged). Enter the string "REMOVE       °
  842.  "'''                                                                          °
  843.   '''on the line labelled "Replace text:". Then click on "Reverse search       °
  844.  "'''                                                                          °
  845.   '''to remove the check, and on the "Change all ocurrences" (to place a       °
  846.  '''                                                                           °
  847.   '''check mark there). This time, pressing the REPLACE button, all'''         °
  848.   '''ocurrences of "cut" past the pointer will be replaced by REMOVE.'''       °
  849. X 'do'                                                                         °
  850. *(1995 5 29 14 34 10 428)                                                      °
  851.  Ftestlog ÉFX 'testlog' 'Σ Store and retrieve a session log'                   °
  852.   '''Take a blank formatted diskette and insert it into drive A:; then c       °
  853.  lick'''                                                                       °
  854.   '''on the "Log" pull down menu and select "Save as...". A "Save as" wi       °
  855.  ndow'''                                                                       °
  856.   '''will appear. It has five boxes labelled: "Save as filename", "Save        °
  857.  file'''                                                                       °
  858.   '''as type", "Drive", "File", and "Directory". The name shown on "Save       °
  859.   as'''                                                                        °
  860.   '''filename" apl00001.log is the default name of the log file. You can       °
  861.  '''                                                                           °
  862.   '''change this name if you wish. Next, click on the arrow button of th       °
  863.  e'''                                                                          °
  864.   '''"Drive" box and select the A: drive. When you do that, the "File" b       °
  865.  ox'''                                                                         °
  866.   '''should become empty (unless you have some files on your A:drive flo       °
  867.  ppy).'''                                                                      °
  868.   '''Press the OK button. The contents of the current session log will b       °
  869.  e''' '''transferred to the A disk.''' 'do'                                    °
  870.   '''Now, click on the "Log" pull down list again, and this time select        °
  871.  the'''                                                                        °
  872.   '''"NEW" line. A "Session Manager Message" box will appear. Click on t       °
  873.  he''' '''OK button. Your session manager screen will clear.'',r'              °
  874.   '''To recover your session log, click on the "Log" pull down menu agai       °
  875.  n,'''                                                                         °
  876.   '''and click on OPEN. Select the A: drive, and the session log. When y       °
  877. Xou''' '''click on OK, your original session will be restored.''' 'do'         °
  878. *(1996 3 31 14 39 3 424)                                                       °
  879.  Ftestob ÉFX 'testob;T;FOO;ARRAY;OP' 'Σ Test the Edit Object option'           °
  880.   'T╜ÉFX ''FOO'' ''Σ Sample APL2 function'' ''''''Replace this line by t       °
  881.  ext'''''''                                                                    °
  882.   'T╜ÉFX ''(X OP) W'' ''Σ Sample APL2 defined operator'' ''X/W'''              °
  883.   'ARRAY╜2 2µ''ABCD'''                                                         °
  884.   '''This exercise will show how the Edit function works. When you press       °
  885.  '''                                                                           °
  886.   '''"Open object..", there is a sample function (FOO), a sample array''       °
  887.  ' '''(ARRAY) and a sample operator (OP) that you can edit without'''          °
  888.   '''disturbing the functions of this workspace.'',r'                          °
  889.   '''To see these objects, enter ÉCR ''''FOO'''', then ÉCR ''''OP'''', a       °
  890.  nd'''                                                                         °
  891.   '''finally DISPLAY ARRAY. (Or just enter: FOO, then +OP ∞5 and ARRAY)'       °
  892.  '' 'do'                                                                       °
  893.   '''Now, select the VARIABLES button from the "Open object" window. The       °
  894.  '''                                                                           °
  895.   '''"Objects" box will show a list of active variables in this workspac       °
  896.  e.'''                                                                         °
  897.   '''Click on the ARRAY line. The word ARRAY will appear on the top box.       °
  898.  '''                                                                           °
  899.   '''If you now click on the OK button, a new window will appear showing       °
  900.  '''                                                                           °
  901.   '''the contents of this variable. You can now make changes to the arra       °
  902.  y.'''                                                                         °
  903.   '''When finished, enter DISPLAY ARRAY, to see the contents of this'''        °
  904.   '''variable. Befoe you quit this exercise, try also to edit the functi       °
  905. Xon''' '''FOO and the operator OP.'',r' '''WARNING: If you''' 'do'             °
  906. *(1996 3 31 14 54 53 684)                                                      °
  907.  Ftestsi ÉFX 'testsi;LOOP;T'                                                   °
  908.   'Σ Test pulldown options in the Signals pull down menu'                      °
  909.   '''A function such as LOOP can be used here to test the three options'       °
  910.  ''                                                                            °
  911.   '''of the Signals pull down menu. This function does not work well unl       °
  912.  ess'''                                                                        °
  913.   '''you place a check mark on "Scroll" line of the OPTONS pull down men       °
  914.  u.'''                                                                         °
  915.   '''(Be sure THERE IS A CHECK on the SCROLL line of the OPTIONS menu be       °
  916.  fore''' '''you proceed with this exercise!)'''                                °
  917.   'T╜ÉFX ''LOOP'' ''É╜''''DELAY='''',ÉDL 1'' ''╕1''' 'showfn ''LOOP'''         °
  918.   'do'                                                                         °
  919.   '''When you enter LOOP, a message will appear on the screen every'''         °
  920.   '''second. By pressing PAUSE this activity will stop. To continue, you       °
  921.  '''                                                                           °
  922.   '''have to press either BREAK or INTERRUPT, followed by ╕ÉLC. The mess       °
  923.  age''' '''will continue appearing every second or so.'''                      °
  924.   '''After pressing BREAK, the prompt moves to a new line. Enter ÉLC to'       °
  925.  ''                                                                            °
  926.   '''see where in the execution stack you are. Now enter ╕ÉLC again to''       °
  927.  '                                                                             °
  928.   '''continue execution of the loop. Then select the INTERRUPT option'''       °
  929.   '''from the menu. This will cause an INTERRUP message to be displayed'       °
  930.  ''                                                                            °
  931.   '''on the screen. To exit the loop enter ╕0 after a BREAK or INTERRUPT       °
  932.  ''' '''Now, enter: LOOP'',r' 'æ╜''      '' ╪ »æ'                              °
  933.   '''In summary, PAUSE will just halt the execution. BREAK will interrup       °
  934.  t'''                                                                          °
  935.   '''and place the prompt on a new line waiting for an keyboard entry.''       °
  936.  ' '''BREAK will simulate an error by displaying an error message.'''          °
  937. X 'do'                                                                         °
  938. XCuc 1 26 ABCDEFGHIJKLMNOPQRSTUVWXYZ                                           °
  939. *(1997 7 29 12 52 55 688)                                                      °
  940.  Fwelcome ÉFX 'welcome' 'Σ Introduction to APL2OS2 tutorials'                  °
  941.   '''Welcome to the APL2OS2 tutorial. If you are not acquainted with APL       °
  942.  ,'''                                                                          °
  943.   '''you should begin with the workspace TEACH1A. If you already know AP       °
  944.  L'''                                                                          °
  945.   '''there are tutorials on the auxilliary processors. You can download'       °
  946.  '' '''these from the APL archives.'',r'                                       °
  947.   '''NOTE:These tutorials are based on a similar set developed some year       °
  948.  s'''                                                                          °
  949.   '''     ago for TRYAPL. To avoid name confusion between those workspac       °
  950.  es'''                                                                         °
  951.   '''     (named TEACH1 through TEACH22) and these, the APL2OS2 workspac       °
  952.  es''' '''     have been named TEACH1A through TEACH22A.''' 'do'               °
  953.   '''The objective of this and subsequent lessons is to provide an'''          °
  954.   '''interactive environment for learning APL2. Although most, if not al       °
  955.  l'''                                                                          °
  956.   '''of the information is available on-line and in the supplied manuals       °
  957.  ,'''                                                                          °
  958.   '''it is not in a form that can be tested at the same time as one read       °
  959.  s'''                                                                          °
  960.   '''the text. If you feel that the IBM provided documentation is adequa       °
  961.  te,'''                                                                        °
  962.   '''you may wish to exit from this workspace, and ignore these tutorial       °
  963.  s. '''                                                                        °
  964.   '''Nevertheless, you might try to read on, and possibly find this appr       °
  965.  oach''' '''useful in learning how to use APL2.'',r' 'do'                      °
  966.   '''NOTE: Whenever there is a pause, you are expected to:'''                  °
  967.   ''' a) read the text'',r,'' b) follow the instructions (if any)'''           °
  968.   ''' c) press Enter to continue the lesson'',r'                               °
  969.   '''As a lesson proceeds, you may on occasion scroll back to see any'''       °
  970. X '''discussion or explanation that may no longer be visible.'''               °
  971.