home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / teachapl.zip / APL2OS2T.ZIP / TEACH44.ATF < prev   
Text File  |  1996-06-16  |  70KB  |  856 lines

  1. XNÉIO 0 1                                                                      °
  2. XNÉCT 0 1.000000000000011E²13                                                  °
  3. XCÉFC 1 6 .,*0_²                                                               °
  4. XNÉRL 0 1060806853                                                             °
  5. XCÉPR 0                                                                        °
  6. XCÉLX 1 5 TEACH                                                                °
  7. *(1992 1 21 11 4 42 364)                                                       °
  8.  FATT ÉFX 'U╜ATT W;T'                                                          °
  9.   'Σ Convert numeric vector to display attribute integer'                      °
  10.   'W╜2 8 2 8|4╞W' 'T╜(=/W[2 4])doif ''W[4]╜8|W[4]+7'''                         °
  11. X 'U╜2¥W[1],(2 2 2ÿW[2]),W[3],2 2 2ÿW[4]'                                      °
  12. *(1992 1 24 10 57 19 492)                                                      °
  13.  FATTS ÉFX 'U╜ATTS W;LC;HC;IN;BL;ÉIO;C;T'                                      °
  14.   'Σ List display attributes associated with integers' 'ÉIO╜0'                 °
  15.   'LC╜(Γ''Light ''),■HC╜''Blue'' ''Green'' ''Cyan'' ''Red'' ''Magenta'''       °
  16.   'LC╜(Γ''Gray''),LC,''Yellow'' ''White'''                                     °
  17.   'LC╜ΘπLC HC╜(Γ''Black''),HC,''Brown'' ''White'''                             °
  18.   'IN╜''Low'' ''High''' 'BL╜''No'' ''Yes'''                                    °
  19.   'U╜Γ''CODE'' ''BLINK'' ''BACKGROUND'' ''INTENSITY'' ''FOREGROUND'''          °
  20.   'L0:C╜(8µ2)ÿT╜╞W' 'W╜1╟W'                                                    °
  21.   'U╜U,ΓT,BL[C[0]],LC[C[4];2¥C[1 2 3]],IN[C[4]],LC[C[4];2¥C[5 6 7]]'           °
  22. X '╕(0<µW)/L0' 'U╜πU'                                                          °
  23. *(1996 6 13 13 7 41 384)                                                       °
  24.  FCOLORS ÉFX 'U╜COLORS;C;T;F;B;N;R'                                            °
  25.   'Σ Select background and foreground colors'                                  °
  26.   'C╜''Black'' ''Blue'' ''Green'' ''Cyan'' ''Red'' ''Magenta'' ''Yellow'       °
  27.  ' ''Gray'''                                                                   °
  28.   'C╜C,''Light Gray'' ''Light Blue'' ''Light Green'' ''Light Cyan'''           °
  29.   'C╜C,''Light red'' ''Light Magenta'' ''Brown'' ''White''' '1 tab C'          °
  30.   'L0:T╜1 get ''Enter the color of text (foreground): '''                      °
  31.   '(R N F)╜ÉEC T ╪ ╕(R=1)/L1 ╪ F╜(ucf C)∞Γucf T ╪ ╕(F≤µC)/L1'                  °
  32.   '''NO SUCH COLOR'' ╪ ╕L0'                                                    °
  33.   'L1:T╜1 get ''Enter the color of the background (field): '''                 °
  34.   '(R N B)╜ÉEC T ╪ ╕(R=1)/L2 ╪ B╜(ucf C)∞Γucf T ╪ ╕(B≤µC)/L2'                  °
  35.   '''NO SUCH COLOR'' ╪ ╕L1'                                                    °
  36.   'L2:╕(F⌠B)/L3 ╪ ''Text and background are the same color'' ╪ ╕L0'            °
  37. X 'L3:U╜0⌐255╛╛(F-1)+16⌡B-1'                                                   °
  38. *(1992 1 14 9 44 41 484)                                                       °
  39.  FDISPLAY ÉFX 'D╜S DISPLAY A;ÉIO;R;C;HL;HC;HT;HB;VL;VB;V;W;N;B'                °
  40.   'Σ DISPLAY A GENERAL ARRAY IN PICTORIAL FORM'                                °
  41.   'Σ  NORMAL CALL IS MONADIC.  DYADIC CALL USED ONLY IN'                       °
  42.   'Σ    RECURSION TO SPECIFY DISPLAY RANK, SHAPE, AND DEPTH.' 'ÉIO╜0'          °
  43.   '»(0=ÉNC ''S'')/''S╜µA''' 'R╜╞µ,S                   Σ PSEUDO RANK.'          °
  44.   'C╜''┐┌└┘''                 Σ UR, UL, LL, AND LR CORNERS.'                   °
  45.   'HL╜''─''                   Σ HORIZONTAL LINE.'                              °
  46.   'HC╜HL,''Θ╕'',HL,''~+ε''      Σ HORIZONTAL BORDERS.'                         °
  47.   'HT╜HC[(0<R)⌡1+0<╞²1╞,S]' 'ΣW╜,0╧■╞0µΓ(1⌐µA)╞A'                              °
  48.   'HB╜HC[3+3╛(''2⌡~A╧«A'' ÉEA ''1+╞ε0⌡(1⌐⌡/µA)╞,A'')+3⌡1<µµS]'                 °
  49.   'VL╜''│''                   Σ VERTICAL LINE.'                                °
  50.   'VB╜VL,''Φ╟''               Σ VERTICAL BORDER.'                              °
  51.   'V╜VB[(1<R)⌡1+0<²1╞²1╟,S]'                                                   °
  52.   '»(0εµA)/''A╜(1⌐µA)µΓ╞A''   Σ SHOW PROTOTYPE OF EMPTIES.'                    °
  53.   '╕(1<╧A)/GEN' '╕(2<µµA)/D3'                                                  °
  54.   'D╜«A                     Σ SIMPLE ARRAYS.' 'W╜1╞µD╜(²2╞1 1,µD)µD'           °
  55.   'N╜²1+1╟µD' '╕(0=µµA)/SS'                                                    °
  56.   'D╜(C[1],V,((W-1)µVL),C[2]),((HT,NµHL),[0]D,[0]HB,NµHL),C[0],(WµVL),C[       °
  57.  3]' '╕0' 'SS:HB╜((0 '' '')=╞0µΓA)/'' -'''                                     °
  58.   'D╜'' '',('' '',[0]D,[0]HB,Nµ'' ''),'' ''' '╕0'                              °
  59.   'GEN:D╜«DISPLAY■A          Σ ENCLOSED ...' 'N╜Dδ.⌠'' '''                     °
  60.   'D╜(Nδ~1ΦN)≡D' 'D╜(δ≡~''  ''╤D)/D' 'D╜((1,µS)µS)DISPLAY D'                   °
  61.   '╕(2≥µ,S)╟D3E,0' 'D3:D╜0 ²1╟0 1╟«ΓA         Σ MULT-DIMENSIONAL ...'          °
  62.   'W╜1╞µD' 'N╜²1+1╟µD'                                                         °
  63.   'D╜(C[1],V,((W-1)µVL),C[2]),((HT,NµHL),[0]D,[0]HB,NµHL),C[0],(WµVL),C[       °
  64.  3]' 'D3E:N╜²2+µ,S'                                                            °
  65. X 'V╜C[Nµ1],[0]VB[1+0<²2╟,S],[0](((²3+╞µD),N)µVL),[0]C[Nµ2]' 'D╜V,D'           °
  66. *(1992 8 14 10 7 40 364)                                                       °
  67.  FDOS ÉFX 'DOS W;T;D100;D2' 'Σ Simulation of DOS prompt'                       °
  68.   'T╜100 ÉSVO ''D100'''                                                        °
  69.   'T╜(2⌠ÉSVO ''D100'')doif ''''''AP100.COM'''' opentwo 1'' ''T╜100 ÉSVO        °
  70.  ''''D100''''''' '╕((0<µ(W⌠'' '')/W)doif ''D100╜W'')/0' 'L0:æ╜''C:>'''         °
  71. X '╕(^/'' ''=T╜3╟æ)/0' 'D100╜T' '╕L0'                                          °
  72. XNFLDS 2 3 6 1 1 5 10 0 2 1 1 1 7 0 64 2 1 2 7 0 174                           °
  73. *(1991 7 26 11 0 0 220)                                                        °
  74.  FFSCLOSE ÉFX 'R╜FSCLOSE;E' 'Σ Retract and expunge shared variables'           °
  75. X 'E╜(ÉEX 5 3µ''CfsDfsfsnfsffss''),ÉSVR 2 3µ''CfsDfs''' '╕R╜0'                 °
  76. *(1991 7 26 11 0 0 220)                                                        °
  77.  FFSOPEN ÉFX 'R╜FSOPEN;E;F;ÉIO' 'Σ Open (Share with AP124)' 'R╜ÉIO╜1'          °
  78.   'E╜(ÉEX 2 3µ''CfsDfs''),ÉSVR 2 3µ''CfsDfs'''                                 °
  79.   '╕(0^.=E╜124 ÉSVO■''Cfs'' ''Dfs'')/LD' 'ÉSVE╜15' 'pVs:'                      °
  80.   '(E F)╜ÉSVO■''Cfs'' ''Dfs''          Σ Check degree of coupling'             °
  81.   '╕((E=2)^(F>0))/mVd                  Σ Out of loop if shared'                °
  82.   '╕(0⌠ÉSVE)/pVs                       Σ Retry if time left'                   °
  83.   '╕LD                                 Σ Out of time, quit'                    °
  84.   'mVd:E╜1 0 1 0 ÉSVC ''Cfs''' 'Cfs╜9 Σ Determine screen size'                 °
  85.   '╕(0⌠╞E╜Cfs)/LC' '╕((1⌠╞µDfs)^2=ÉNC ''fss'')/LB' 'fss╜2╞2╟,Dfs'              °
  86.   'LB:╕R╜0' 'LC:╕0,µÉ╜''FSOPEN - AP124 error: '',«E'                           °
  87. X 'LD:╕0,µÉ╜''FSOPEN - AP124 share offer failed'''                             °
  88. *(1992 1 14 9 44 42 488)                                                       °
  89.  FGO ÉFX 'GO;b;e;t' 'Σ Expression driver' 'L0:b╜e╜''''' 'æ╜''       '''        °
  90.   't╜æ' '╕(^/'' ''=t)/L0' '╕((^/'')OFF ''=5╞6╟t)doif ''exit'')/0'              °
  91.   '╕(('':''εt)doif ''b╜evaldd (+/^\'''' ''''=t)╟t'')/L0'                       °
  92.   '''e╜ÉEM'' ÉEA t' '╕(0=µ,e)/L0' '╕b/L0'                                      °
  93.   '''This is not a valid APL2 expression''' 'æ╜''*'''                          °
  94. X '╕(''?''⌠╞1╟æ)/L0' 'e' '╕L0'                                                 °
  95. *(1995 4 23 14 14 6 304)                                                       °
  96.  FSVOFFER ÉFX 'DC╜PID SVOFFER SV' 'SV╜(²2╞1 1,µSV)µSV╜πSV'                     °
  97.   '╕(2=ÉNC ''PID'')/DYADIC' 'DC╜ÉSVO SV ╪ ╕0'                                  °
  98.   'DYADIC:╕(1^.⌠DC╜PID ÉSVO SV)/END' 'ÉSVE╜15'                                 °
  99.   'CHECK:╕(1^.⌠DC╜ÉSVO SV)/END' '╕(0⌠ÉSVE)/CHECK'                              °
  100. X 'END:SV╜1 0 1 0 ÉSVC SV'                                                     °
  101. *(1996 6 11 13 4 44 376)                                                       °
  102.  FTEACH ÉFX 'TEACH' 'Σ Copyright Z V Jizba 1991; all rights reserved'          °
  103.   'copyright' 'initialize' 'warning' '''One moment please!''' 'panela'         °
  104.   'TEACH1  Σ Full screen auxilliary processor'                                 °
  105.   'TEACH2  Σ Control and Data variables, screen mode'                          °
  106.   'TEACH3  Σ Manipulating the screen' 'TEACH4  Σ Fields'                       °
  107.   'TEACH5  Σ Entering data into a field'                                       °
  108.   'TEACH6  Σ Changing attributes of fields'                                    °
  109.   'TEACH7  Σ Interacting with the physical screen'                             °
  110.   'TEACH8  Σ Practice using fields' 'TEACH9  Σ Entering data'                  °
  111. X 'TEACH10 Σ Miscellaneous commands'                                           °
  112. *(1996 6 13 13 22 47 468)                                                      °
  113.  FTEACH1 ÉFX 'TEACH1;T;C124;D124' 'Σ A P 124' '5 1µ'' '''                      °
  114.   '''THE FULL SCREEN AUXILLIARY PROCESSOR 124'',r'                             °
  115.   '''The opening panel of this lesson illustrates the nature of the Full       °
  116.  '''                                                                           °
  117.   '''screen Auxilliary Processor 124. It provides the capability to'''         °
  118.   '''generate fields on the screen, and to control the behavior of those       °
  119.  '''                                                                           °
  120.   '''fields. (You can re-create the starting panel by entering: panela,'       °
  121.  '' '''BUT KEEP IN MIND THAT THIS FUNCTION WILL RETRACT AP 124.)'''            °
  122.   'do' '''We begin by activating the Auxilliary Processor'',r'                 °
  123.   'show ''124 SVOFFER ''''C124'''' ''''D124'''''''                             °
  124.   '''This AP requires two shared variables. D124 to contain data, and C1       °
  125.  24'''                                                                         °
  126.   '''to control the activity of the display. We can begin by investigati       °
  127.  ng''' '''the initial format of the "LOGICAL SCREEN".'',r'                     °
  128.   'show ''C124╜9 ╪ D124 ╪ test'''                                              °
  129.   '''Note the sequence: First we specified the desired action by assigni       °
  130.  ng'''                                                                         °
  131.   '''an integer (9) to C124. Then we interrogated the response which is'       °
  132.  ''                                                                            °
  133.   '''stored in D124. We find from the six element vector that the initia       °
  134.  l''' '''logical screen has the following characteristics:'',r'                °
  135.   '''  1 The field begins in row 1 of the screen'''                            °
  136.   '''  1 The field begins in column 1 of the screen'''                         °
  137.   ''' 37 The field contains 37 rows'''                                         °
  138.   ''' 80 The field contains 80 columns'''                                      °
  139.   '''  2 The field is for output only'''                                       °
  140.   '''  1 The foreground color is 1 (blue)'',r'                                 °
  141.   '''NOTE! The initial value of this vector (in D124) cannot be used, an       °
  142.  d''' '''      MUST be re-defined for a new window.'',r' 'do'                  °
  143.   '''The above example illustrated the process of dealing with AP 124:''       °
  144.  ,r' ''' 1. A numeric command was given to the CONTROL variable'''             °
  145.   ''' 2. The DATA variable was next used (or it may be assigned)'',r'          °
  146.   '''While these two variables were being invoked, no visible action was       °
  147.  ''' '''taking place on the screen.'',r'                                       °
  148.   '''The contents of the screen is manipulated by these two variables'''       °
  149.   '''(CONTROL and DATA) in a separate block of memory called the LOGICAL       °
  150.  '''                                                                           °
  151.   '''SCREEN. Only when the process of building this LOGICAL SCREEN is'''       °
  152.   '''completed, the block can be transferred to the "visible" or PHYSICA       °
  153. XL''' '''SCREEN.''' 'do' 'T╜ÉSVR■''C124'' ''D124''' 'TEACH1A' 'end'            °
  154. *(1996 6 16 12 31 11 368)                                                      °
  155.  FTEACH10 ÉFX 'TEACH10;T;C124;D124' 'Σ Miscellaneous Commands'                 °
  156.   '''RETRIEVING POSTED DATA'',r' 'T╜124 SVOFFER ''C124'' ''D124'''             °
  157.   'FLDS╜π(1 1 5 10 0 2)(1 1 1 7 0 64)(2 1 2 7 0 174) ╪ D124╜FLDS'              °
  158.   'C124╜14 0 70 4 8 ╪ test'                                                    °
  159.   'C124╜1 ╪ test ╪ D124╜π''FIELD 2'' ''FIELD 3'' ╪ C124╜4 2 3 ╪ test'          °
  160.   '''RETRIEVING DATA FROM THE PHYSICAL SCREEN'',r'                             °
  161.   '''In this example the two fields are labelled "FIELD 1" and "FIELD 2"       °
  162.  .''' '''Press ENTER, before clicking on the Session Monitor'',r'              °
  163.   'C124╜3 ╪ test ╪ T╜D124' 'do'                                                °
  164.   '''We have seen how windows and data can be placed on the physical'''        °
  165.   '''screen. We also need a way to retrieve data that may have been'''         °
  166.   '''entered by the user. There are three commands to do that:'''              °
  167.   '''"C124╜10 1" will return in D124 the logical screen as a character''       °
  168.  ' '''array'',r' 'show ''C124╜10 1 ╪ test ╪ µD124'''                           °
  169.   '''Commands 5 and 15 allow the retrieval of data from selected fields.       °
  170.  '''                                                                           °
  171.   '''The first command (5) will return the data as a simple array, one''       °
  172.  '                                                                             °
  173.   '''row for each field. The second command (15) will return the data as       °
  174.  ''' '''a nested vector. The field elements retain their shape.'',r'           °
  175.   'show ''C124╜5 2 3 ╪ test ╪ DISPLAY D124'''                                  °
  176.   'show ''C124╜15 2 3 ╪ test ╪ DISPLAY D124'''                                 °
  177.   '''MISCELLANEOUS COMMANDS'',r'                                               °
  178.   '''There are several additional commands that can be used with AP 124.       °
  179.  ''' '''We will list these, but give only brief examples on some.'''           °
  180.   'do'                                                                         °
  181.   '''"C124╜8,n" allows switching between APL2 and National Keyboard'',r'       °
  182.   '''SET    ACTION''' '''8      Set to APL2 keyboard'''                        °
  183.   '''8 0    Same as 8''' '''8 1    Set to National Keyboard'''                 °
  184.   '''8 2    Return Status (we have seen this in action already)'',r'           °
  185.   '''The results of the operation are returned in D124'''                      °
  186.   'show ''C124╜8 2 ╪ test ╪ D124'''                                            °
  187.   '''Only the first, fourth and last values have meaning:'',r'                 °
  188.   '''   D124[1]= Keyboard status (1=APL2)'''                                   °
  189.   '''   D124[4]= Beep request on or off'''                                     °
  190.   '''   D124[6]= Cursor mode (0=normal, 1=field)''' 'do'                       °
  191.   '''"C124╜11" controls the beep. There are three options: 0=delayed bee       °
  192.  p,'''                                                                         °
  193.   '''          1=immediate beep, 2=cancel previous delayed beep.'',r'          °
  194.   'show ''C124╜11 1 ╪ test'''                                                  °
  195.   '''Finally, "C124╜17,n" returns a character matrix containing the'''         °
  196.   '''attribute characters of each position in the field'',r'                   °
  197.   'show ''FLDS[;6] ╪ C124╜17 1 2 3 ╪ test ╪ DISPLAY D124'''                    °
  198.   '''There is more to this Auxilliary processor. We have not covered'''        °
  199.   '''various options under commands 1 and 3. You may wish to examine'''        °
  200.   '''the APL2 functions in workspaces 2 AP124 and 2 DEMO124.'',r'              °
  201.   '''Nothing was said about the graphics modes. Quite frankly, it is'''        °
  202.   '''not clear precisely how that is to be used. You are certainly'''          °
  203. X '''encouraged to experiment with these and other modes.''' 'end'             °
  204. *(1996 6 7 12 39 2 328)                                                        °
  205.  FTEACH1A ÉFX 'TEACH1A;Cfs;Dfs' 'Σ Functions from the AP124 workspace'         °
  206.   '''THE AP124 WORKSPACE'',r'                                                  °
  207.   '''We have used function SVOFFER to illustrate how to activate this'''       °
  208.   '''auxilliary processor. There is a workspace named AP124 in library 2       °
  209.  '''                                                                           °
  210.   '''that contains a number of useful functions. (Their name is of the''       °
  211.  '                                                                             °
  212.   '''form "FS..."). We will illustrate these utilities at the same time'       °
  213.  '' '''as we discuss various features of AP 124.'',r'                          °
  214.   '''For example, instead of using SVOFFER, there is FSOPEN which does''       °
  215.  '                                                                             °
  216.   '''the same thing as the expression: 124 SVOFFER ''''Cfs'''' ''''Dfs''       °
  217.  '''''                                                                         °
  218.   '''(Note the different labels for the "control" and "data" variables.)       °
  219.  '',r'                                                                         °
  220.   '''Function FSOPEN does one additional thing. It invokes the control''       °
  221.  '                                                                             °
  222.   '''variable Cfs with command 9 (as above) and stores the screen column       °
  223.  ''' '''and row integers in the global variable "fss".'',r'                    °
  224.   'show ''FSOPEN'' ''fss'''                                                    °
  225.   '''Note that FSOPEN is a niladic function that returns the RETURN CODE       °
  226.  .'''                                                                          °
  227.   '''There is also function FSCLOSE to retract AP 124 and delete all'''        °
  228.   '''variables created by utility functions "FS..." (exception: "fsf").'       °
  229. X',r' 'show ''FSCLOSE'' ''ÉNC ''''fss'''''''                                   °
  230. *(1996 6 13 13 34 1 332)                                                       °
  231.  FTEACH2 ÉFX 'TEACH2;C124;D124' 'Σ A P 124'                                    °
  232.   '''To understand how AP 124 works, we must describe the COMMANDS that        °
  233.  can be'''                                                                     °
  234.   '''given to the CONTROL variable, and the data (if any) that can be as       °
  235.  signed'''                                                                     °
  236.   '''to (or extracted from) the DATA variable. The commands to the contr       °
  237.  ol''' '''are numeric integers (or integer vectors).''' 'do'                   °
  238.   '''THE AP 124 COMMANDS'',r' '''SCREEN MODE'',r'                              °
  239.   'T╜124 SVOFFER ''C124'' ''D124'''                                            °
  240.   '''Before we begin building the logical screen, we must be able to'''        °
  241.   '''erase its contents and to define its nature. The commands to do the       °
  242.  se'''                                                                         °
  243.   '''things are issued when the first digit assigned to C124 is a zero''       °
  244.  ' '''(We will continue to use "C124" and "D124" in the examples.)'',r'        °
  245.   'show ''C124╜0'''                                                            °
  246.   '''This first expression erases the contents of both the logical and''       °
  247.  ' '''the physical screen.'',r' 'show ''C124'''                                °
  248.   '''The reference to C124 gives the RETURN CODE of the action just take       °
  249.  n.''' '''A zero return code means success.''' 'do'                            °
  250.   '''TESTING THE RETURN CODE'',r'                                              °
  251.   '''We will invoke function "test". This function will be used'''             °
  252.   '''to test the return code by issuing the control variable C124.'',r'        °
  253.   'showfn ''test'''                                                            °
  254.   'r,''If the return code is a 0, "test" exits; else "test" prints out''       °
  255. X' '''the return code and aborts the lesson''' 'end'                           °
  256. *(1996 6 13 13 38 45 524)                                                      °
  257.  FTEACH3 ÉFX 'TEACH3;D;T;C124;D124' 'Σ Manipulating a physical screen'         °
  258.   '''MANIPULATING THE SCREEN'',r'                                              °
  259.   '''Before we begin studying the commands that generate windows'''            °
  260.   '''using AP124, it is useful to practice manipulating a graphic'''           °
  261.   '''window. The techniques are essentially those you use in OS2.'',r'         °
  262.   '''FIRST EXERCISE'',r'                                                       °
  263.   '''The initial window of this lesson will appear when you press Enter.       °
  264.  '''                                                                           °
  265.   '''As the window appears, note that the prompt is changed into a QUAD'       °
  266.  ''                                                                            °
  267.   '''PLACE THE MOUSE POINTER ON THIS QUAD and click the left button.'''        °
  268.   '''(actually anywhere on the APL2 session window will do)''' 'do'            °
  269.   'T╜124 SVOFFER ''D124'' ''C124'''                                            °
  270.   'D╜4 6µ1 1 1 2000 2 7 10 5 10 25 2 31 2 45 20 4 2 79 17 20 4 50 2 127'       °
  271.   'D124╜D' 'C124╜1' 'D124╜10µ''x'' ╪ C124╜2 1'                                 °
  272.   'D124╜1 51µ''THE FULL SCREEN MANAGEMENT AUXILLIARY PROCESSOR 124'''          °
  273.   'C124╜21 1'                                                                  °
  274.   'D124╜''Click on the QUAD in the Session Manager screen''' 'C124╜2 1'        °
  275.   'D124╜(4 1µ''  '') ╪ C124╜2 1 2 3 4 ╪ test' 'do'                             °
  276.   '''SECOND EXERCISE'',r'                                                      °
  277.   '''The window has now been defined in the LOGICAL screen. Press Ctrl''       °
  278.  ' '''and at the same time Esc. This will cause the display of the'''          °
  279.   '''WINDOW LIST. When you double click on the line labelled AP124,'''         °
  280.   '''the contents of the LOGICAL screen will be displayed on your'''           °
  281.   '''PHYSICAL screen. Again click on the QUAD.''' 'do'                         °
  282.   '''THIRD EXERCISE '',r'                                                      °
  283.   '''Select the AP124 window again (Ctrl-Esc and AP124). This time'''          °
  284.   '''place the mouse cursor at the edges of the AP124 window and change'       °
  285.  ''                                                                            °
  286.   '''its size. Then place the mouse cursor on the header and move the'''       °
  287.   '''window around while pressing the left button''' 'do'                      °
  288.   '''You should be able now to display the logical window when asked'''        °
  289.   '''to do so. Also you should be able to move the window out of the'''        °
  290. X '''way so you can read the instructions.''' 'end'                            °
  291. *(1996 6 13 13 50 42 560)                                                      °
  292.  FTEACH4 ÉFX 'TEACH4;A;T;FL;C124;D124' 'Σ Format screen into fields'           °
  293.   'T╜124 SVOFFER ''C124'' ''D124''' '''FIELDS'',r'                             °
  294.   '''The rectangular blocks seen on the starting panel are called "FIELD       °
  295.  S".'''                                                                        °
  296.   '''The location, size, color and other properties of these fields are'       °
  297.  '' '''defined with the following sequence:'',r'                               °
  298.   'show ''FL╜2 6µ10 12 1 15 2 64 15 12 1 15 2 96 ╪ D124╜FL ╪ C124╜1 ╪ te       °
  299.  st'''                                                                         °
  300.   '''The first expression defines FL, a numeric array containing six col       °
  301.  umns'''                                                                       °
  302.   '''of integers. The second expression assigns this array to the shared       °
  303.  '''                                                                           °
  304.   '''variable D124. (We could have assigned the data directly to D124,''       °
  305.  ' '''but the array is often manipulated separately.)'',r'                     °
  306.   '''The third expression is a command to initiate formatting of the'''        °
  307.   '''logical screen. We then ask for the return code to verify the succe       °
  308.  ss.''' 'do' 'show ''A╜π''''FIELDS'''' («FL[1;]) ╪ DISPLAY A'''                °
  309.   '''Character array A contains data we want to store in the two fields'       °
  310.  ',r' 'show ''D124╜A ╪ C124╜4 1 2 ╪ test'''                                    °
  311.   '''Before we display the two fields, we write the word "FIELDS" into''       °
  312.  '                                                                             °
  313.   '''the first one. Into the second field we write the format of the'''        °
  314.   '''first field. Note the sequence. D124 is assigned a character array'       °
  315.  ''                                                                            °
  316.   '''containing the data to be displayed. C124 is then assigned the code       °
  317.  '''                                                                           °
  318.   '''(4) to write data to the logical screen -- first row to field 1 and       °
  319.  ''' '''the second row to field 2.'',r'                                        °
  320.   '''When you press Enter after this paragraph you will see another set'       °
  321.  ''                                                                            °
  322.   '''of commands that cause the window to appear. Code (3 2) signals'''        °
  323.   '''the physical screen to be displayed. Next the return code is tested       °
  324.  .''' '''Finally the contents of D124 is stored and displayed in T'''          °
  325.   'do' 'show ''C124╜3 2 ╪ test ╪ T╜D124 ╪ T'''                                 °
  326.   '''Note that the character string FIELDS has been transferred to the''       °
  327.  ' '''first field defined in variable A. The second field contains'''          °
  328.   '''the numeric values that define the first field.'',r'                      °
  329.   '''Since you did not close the physical screen, it is still minimized.       °
  330.  '''                                                                           °
  331.   '''Click on the Window list and double click on the AP124 line. Then''       °
  332.  ' '''close the physical screen by double clicking on its upper left'''        °
  333.   '''hand corner.''' 'do'                                                      °
  334.   '''Although the physical screen has disappeared (try Ctrl-Esc), the'''       °
  335.   '''shared variables are still active, and so is the logical screen.'',       °
  336.  r' 'show ''ÉSVO■ ''''C124'''' ''''D124'''''''                                 °
  337.   '''Let us now see what the six integers of the numeric array mean'',r'       °
  338.   '''COLUMN CONTENTS''' '''    1  Start row of the field'''                    °
  339.   '''    2  Start column of the field'''                                       °
  340.   '''    3  Number of rows in the field (field height)'''                      °
  341.   '''    4  Number of columns in the field (field length)'''                   °
  342.   '''    5  Type of field (input/output/numeric/character)'''                  °
  343.   '''    6  Field attributes (colors,intensity,blinking)'',r' 'do'             °
  344.   '''You might have recognized these data. They have the same meaning'''       °
  345.   '''as the initial format of the logical screen. Before we go into'''         °
  346.   '''specifics of columns 5 and 6, let us first study how fields can be'       °
  347.  '' '''changed.'',r'                                                           °
  348.   'show ''É╜FL╜2 6µ10 12 1 15 2 64 15 12 1 15 2 64 ╪ D124╜FL ╪ C124╜1 ╪        °
  349.  test'''                                                                       °
  350.   '''We have now defined two rows in array FL, and assigned this new'''        °
  351.   '''array to D124. The two rows of FL are identical, except for the'''        °
  352.   '''first column. Field 1 starts at screen row 10. Field 2 at row 15.''       °
  353.  ' 'do' 'show ''D124╜«FL ╪ C124╜2 1 2 ╪ test'''                                °
  354.   '''This time we used command (2) instead of (4). The assignment to'''        °
  355.   '''C124 (2 1 2) causes the contents of FL to be written immediately'''       °
  356.   '''to both the logical and physical screen.''' 'do'                          °
  357.   '''Now let us see what happens if we change the contents of one of'''        °
  358.   '''the fields'',r'                                                           °
  359.   'show ''FL[2;3 6]╜2 32 ╪ D124╜FL[2;] ╪ C124╜1 2 ╪ test'''                    °
  360.   '''This time when we issued command 1, we added field number 2 so'''         °
  361.   '''that the pre-existing definition of this field should  be changed.'       °
  362.  ''                                                                            °
  363.   '''UNFORTUNATELY ON MY VERSION OF APL2OS2 THIS HAS NO EFFECT !???'',r'       °
  364.   'show ''D124╜«FL ╪ C124╜2 1 2 ╪ test'''                                      °
  365.   '''Command (2) however seems to have produced the desired effect.'''         °
  366.   '''You can display the physical screen now to see the result.''' 'do'        °
  367.   '''In summary, we studied four commands: 1 4 and 3'''                        °
  368.   '''Command 1 (with no arguments) defines fields as defined in D124.'''       °
  369.   '''Command 4 (with field numbers) stores data in the specified fields.       °
  370.  '''                                                                           °
  371.   '''Command 2  is the same as command 4, but the effect is immediate.''       °
  372.  '                                                                             °
  373.   '''Command 3 (with code giving mode of return to APL2) displays fields       °
  374. X.''' 'end'                                                                    °
  375. *(1996 6 13 13 56 30 536)                                                      °
  376.  FTEACH5 ÉFX 'TEACH5;FLDS;C124;D124;T'                                         °
  377.   'Σ Formatting screen into fields (continued)'                                °
  378.   'T╜124 SVOFFER ''C124'' ''D124'''                                            °
  379.   'show ''FLDS╜2 6µ10 12 1 7 2 64 15 15 2 7 2 32 ╪ D124╜FLDS ╪ C124╜1'''       °
  380.   '''Since command 2 appears to be crucial to the usage of AP124, we wil       °
  381.  l''' '''review its syntax once more:'',r'                                     °
  382.   '''ENTERING DATA INTO A FIELD'',r'                                           °
  383.   '''In the previous examples we have seen how one can define rectangula       °
  384.  r'''                                                                          °
  385.   '''blocks called fields. For most applications one not only wants to''       °
  386.  '                                                                             °
  387.   '''highlight these areas, but also enter alpha numeric information. Th       °
  388.  is'''                                                                         °
  389.   '''can be accomplished with command "C124╜2,n". Let us place in the fi       °
  390.  rst''' '''field the label "Field 1" .'',r'                                    °
  391.   'show ''FLDS'' ''D124╜1 7µ''''Field 1'''''' ''C124╜2 1 ╪ test'''             °
  392.   '''Since the first field is a block of dimension 1⌡7, we assigned a'''       °
  393.   '''character array of that dimension to D124. Then we issued a command       °
  394.  '''                                                                           °
  395.   '''to C124. The first digit (2) tells to place data in D124 in the fie       °
  396.  ld'''                                                                         °
  397.   '''specified by the second digit (1). The return code verifies that al       °
  398.  l''' '''went as expected.'',r'                                                °
  399.   '''We can see that the first field contains the assigned text. Next, t       °
  400.  o'''                                                                          °
  401.   '''place data in the second field, we must again assign text to D124''       °
  402.  ,r'                                                                           °
  403.   'show ''DISPLAY D124╜2 7µ''''Color    GREEN'''''' ''C124╜2 2 ╪ test'''       °
  404.   '''And again by selecting AP124 on the Window list, we verify that the       °
  405.  ''' '''second field does indeed now contains that information.'''             °
  406. X 'end'                                                                        °
  407. *(1996 6 13 13 7 20 300)                                                       °
  408.  FTEACH6 ÉFX 'TEACH6;T;C124;D124' 'T╜124 SVOFFER ''C124'' ''D124'''            °
  409.   'FLDS╜2 6µ10 12 1 7 2 64 15 15 2 7 2 32' 'D124╜FLDS' 'C124╜1'                °
  410.   '''CHANGING THE DISPLAY ATTRIBUTES OF FIELDS'',r'                            °
  411.   '''Column five of the display attribute table defines the FIELD TYPE.'       °
  412.  ''                                                                            °
  413.   '''We will return to this later, since it''''s usage requires addition       °
  414.  al''' '''control commands.'',r'                                               °
  415.   '''Column six of the display attribute table defines the color of text       °
  416.  ''' '''(foreground) and of the field (background). The number is a'''         °
  417.   '''composition of 8 bits representing (from left to right) the'''            °
  418.   '''following features'',r' '''BIT #   MEANING'''                             °
  419.   ''' 1-4    Background color (field) (0 to 15)'''                             °
  420.   ''' 5-8    Foreground color (text)  (0 to 15)'',r' 'do'                      °
  421.   '''Background color is the color of the field. In our example red for'       °
  422.  ''                                                                            °
  423.   '''field 1 and green for field 2. The foreground color is that of text       °
  424.  .''' '''(In our example the text color was black.)'',r'                       °
  425.   'show ''FLDS'''                                                              °
  426.   '''The bit pattern, is stored in column 6 as an integer.'''                  °
  427.   '''Since setting up of these display attributes requires bit conversio       °
  428.  ns,'''                                                                        °
  429.   '''it is useful to have some utility functions. Function COLORS lists        °
  430.  the'''                                                                        °
  431.   '''available colors, then prompts for the desired ones. It returns the       °
  432.  '''                                                                           °
  433.   '''numeric "color field attribute" (an integer 0-255). In the followin       °
  434.  g''' '''example, try for a black text and a red background:'',r'              °
  435.   'show ''COLORS'''                                                            °
  436.   '''If you entered a 1 for color of text and a 5 for the color of the''       °
  437. X' '''field, COLORS should have returned a 64.''' 'end'                        °
  438. *(1996 6 13 14 17 53 476)                                                      °
  439.  FTEACH7 ÉFX 'TEACH7;T;C124;D124;FLDS' 'Σ Entering and retrieving data'        °
  440.   'T╜124 SVOFFER ''C124'' ''D124'''                                            °
  441.   'FLDS╜3 6µ1 1 20 70 2 150 10 12 1 17 2 64 15 15 2 25 2 32'                   °
  442.   '''INTERACTING WITH THE PHYSICAL SCREEN'',r'                                 °
  443.   '''In this section we will describe some of the AP 124 commands.'''          °
  444.   '''The process of creating a logical screen is fairly simple, but'''         °
  445.   '''it does require a certain sequence of steps that may not be'''            °
  446.   '''obvious from a mere reading of the User Manual.'',r'                      °
  447.   '''We begin by clearing the screen and by formatting it'',r'                 °
  448.   'show ''C124╜0'' ''FLDS'' ''D124╜FLDS ╪ C124╜1 ╪ test'''                     °
  449.   '''We have defined three fields. Field 1 represents the window.'''           °
  450.   '''Fields 2 and 3 are boxes within the window.'',r'                          °
  451.   '''So far we have repeated the sequence that we already discussed'''         °
  452.   '''earlier. At this point we could verify the format of the "logical''       °
  453.  ' '''screen" by issuing command 9'',r'                                        °
  454.   'show ''C124╜9 ╪ T╜D124 ╪ test ╪ T''' 'TEACH7A'                              °
  455.   '''We are now ready to display the window. This is done with the'''          °
  456.   '''"Read and Wait" (or "Read and Test") command 3. We will issue'''          °
  457.   '''3 2 which stands for the return to APL2 whenever ANY key is'''            °
  458.   '''pressed. You will notice that having pressed a key, the window'''         °
  459.   '''remains open, but the cursor (a quad) will blink on the APL2'''           °
  460.   '''screen (you may have to move the physical screen out of the way).''       °
  461.  ' 'show ''C124╜3 2 ╪ T╜D124 ╪ test ╪ T'''                                     °
  462.   '''To actually return to APL2, and make the physical screen to'''            °
  463. X '''disappear you had to click on the QUAD.''' 'end'                          °
  464. *(1996 6 13 14 2 46 388)                                                       °
  465.  FTEACH7A ÉFX 'TEACH7A;TEXT' 'Σ Entering and retrieving data'                  °
  466.   '''We can now specify some window parameters. For example, the'''            °
  467.   '''command C124╜14,[arg] sets the window background color or its'''          °
  468.   '''size and placement. The following options are available:'',r'             °
  469.   '''Argument  Meaning''' '''²²²²²²²²²²²²²²²²²'''                              °
  470.   ''' empty    D124 returns background color,row,column,height,width'''        °
  471.   '''[16⌡1-16] Sets the color of the screen background'''                      °
  472.   ''' 4µn      Sets the window size (row,column,height,width)'',r'             °
  473.   '''For illustration, we will set background color to 16⌡9 (light'''          °
  474.   '''blue) and place the upper left hand corner of the window at row 12'       °
  475.  ''                                                                            °
  476.   '''column 6. We also size the window to have 16 rows and 60 columns.''       °
  477.  ,r' 'show ''C124╜14 144 ╪ test ╪ C124╜14 4 6 16 60 ╪ test'''                  °
  478.   '''We can verify this using command 14 with no argument'',r'                 °
  479.   'show ''C124╜14 ╪ D124 ╪ test'''                                             °
  480.   '''This definition of window place and size takes precedence over'''         °
  481.   '''row 1 of of array FLDS.'',r'                                              °
  482.   '''Next we we want to place some text in the windows. To do that, we''       °
  483.  ' '''will invoke command 4. This "Delayed Write of Data to Screen"'''         °
  484.   '''affects only the logical screen. This command takes the array'''          °
  485.   '''of character data in D124 and places it in as many numbered fields'       °
  486.  '' '''as there are rows in the array.'',r'                                    °
  487.   'show ''D124╜''''Explanations can be placed here'''' ╪ C124╜4 1 ╪ test       °
  488.  ''' '''The Delayed Write places the text into field 1.'',r'                   °
  489.   'TEXT╜π''WINDOW 2'' ''WINDOW 3'''                                            °
  490.   '''We can also enter some text into windows 2 and 3:'''                      °
  491.   'show ''DISPLAY TEXT'' ''D124╜TEXT ╪ C124╜4 2 3 ╪ test'''                    °
  492.   '''The text in array TEXT is placed in fields 2 and 3.'',r'                  °
  493.   '''Note that had we entered text in field 1 last, the text in fields''       °
  494.  ' '''2 and 3 would have been erased'',r'                                      °
  495.   '''We should also place the cursor at a specific location of a field,'       °
  496.  '' '''say field 1 row 2 column 3. this is done with command 12'',r'           °
  497.   'show ''D124╜1 2 3 ╪ C124╜12 ╪ test'''                                       °
  498.   '''Finally we might also place a title on the window title bar.'''           °
  499.   '''The command for doing that is 21 1'',r'                                   °
  500.   'show ''D124╜''''THIS IS THE SAMPLE TITLE'''' ╪ C124╜21 1 ╪ test'''          °
  501. X '' ''                                                                        °
  502. *(1996 6 15 19 26 35 468)                                                      °
  503.  FTEACH8 ÉFX 'TEACH8;T;FLDS;C124;D124' 'Σ Additional commands to C124'         °
  504.   'T╜124 SVOFFER ''C124'' ''D124'''                                            °
  505.   'FLDS╜2 6µ10 12 1 7 2 64 15 15 2 7 2 32' 'D124╜FLDS' 'C124╜1 ╪ test'         °
  506.   'FLDS ╪ D124╜FLDS ╪ C124╜1 ╪ test'                                           °
  507.   'D124╜''SAMPLE'' ╪ C124╜21 1 ╪ test'                                         °
  508.   '''SETTING WINDOW SIZE AND PLACEMENT'',r'                                    °
  509.   '''Command 14 gives you the control of the location of the physical'''       °
  510.   '''window. In the following example, the upper left corner of the wind       °
  511.  ow'''                                                                         °
  512.   '''will be placed in row 1 and in column 79 of the Session Manager'''        °
  513.   '''its shape will be 16 rows and 30 columns. (Actually the top of the'       °
  514.  ''                                                                            °
  515.   '''physical screen will be on row 3 of the Session Manager screen.)'''       °
  516.   '''Why? Ask IBM!'''                                                          °
  517.   'show ''C124╜14 1 79 16 30 ╪ test ╪ C124╜3 2 ╪ test ╪ D124'''                °
  518.   '''D124 returned an integer vector. The ²1 ²1 means that by using a'''       °
  519.   '''3 2 command, you did not have to press any key to return to APL2.''       °
  520.  ' '''The following zero (0) means that the cursor was found in an'''          °
  521.   '''undefined field, and the 1 1 tells that cursor to be in row 1,'''         °
  522.   '''column 1.''' 'do' '''MOVING THE CURSOR ON THE PHYSICAL SCREEN'',r'        °
  523.   '''At the next pause try to move the cursor using the ARROW keys. You        °
  524.  can'''                                                                        °
  525.   '''do that now, because the assignment to C124╜3 0 allows interactive'       °
  526.  ''                                                                            °
  527.   '''input. If, however, you try to enter data, you will hear a beep.'',       °
  528.  r'                                                                            °
  529.   '''BEFORE YOU CLICK ON THE QUAD IN THE SESSION MANAGER, DO THE FOLLOWI       °
  530.  NG:'''                                                                        °
  531.   '''Using the arrow keys, move the cursor inside the window to the'''         °
  532.   '''second (green) field (COL 1 ROW 3), and then press the HOME key.'''       °
  533.   '''THEN you may click on the quad in the Session Manager window'',r'         °
  534.   'show ''D124╜1 7µ''''FIELD 1'''' ╪ C124╜2 1 ╪ C124╜3 ╪ test ╪ D124'''        °
  535.   '''If you have followed these instructions, the contents of D124 is'''       °
  536.   '''the vector 6 1 2 1 3. The home key corresponds to 6 1, the field'''       °
  537.   '''number is 2, and the row and column numbers (1 3) show the last'''        °
  538.   '''position of the cursor.'',r'                                              °
  539.   '''WARNING! THE BEHAVIOR MAY NOT BE AS EXPECTED IF YOU DO NOT FOLLOW''       °
  540. X' '''         INSTRUCTIONS EXACTLY''' 'end'                                   °
  541. *(1996 6 15 19 49 12 468)                                                      °
  542.  FTEACH9 ÉFX 'TEACH9;T;FLDS;C124;D124' 'Σ Additional commands to C124'         °
  543.   'T╜124 SVOFFER ''C124'' ''D124'''                                            °
  544.   'FLDS╜2 6µ10 12 1 7 2 64 15 15 2 7 2 32' 'D124╜FLDS' 'C124╜1'                °
  545.   '''We will now define two small fields in a new window. (You should'''       °
  546.   '''be able to recognize the meaning of the following commands.)'''           °
  547.   '''Note, however, that command 3 0 requires you to press first one'''        °
  548.   '''of the special "gray" keys such as Enter, Home or End. Until you'''       °
  549.   '''do so, the screen wil remain locked up.'',r'                              °
  550.   'D124╜FLDS ╪ C124╜1 ╪ test'                                                  °
  551.   'D124╜''SAMPLE'' ╪ C124╜21 1 ╪ test ╪ C124╜14 0 79 16 30 ╪ test'             °
  552.   'show ''D124╜1 7µ''''FIELD 1'''' ╪ C124╜2 1 ╪ test ╪ C124╜3 0 ╪ test ╪       °
  553.   D124''' '''MOVING THE CURSOR TO A FIELD'',r'                                 °
  554.   '''Notice that the cursor is in the upper left corner of the window.''       °
  555.  '                                                                             °
  556.   '''If we want to move this cursor to field one we have to specify the'       °
  557.  '' '''command 12 as follows'',r'                                              °
  558.   'show ''D124╜2 1 3 ╪ C124╜12 ╪ test'''                                       °
  559.   '''We have placed the cursor in field 2, row 1, column 3''' 'do'             °
  560.   '''CHANGING CHARACTERISTICS OF A FIELD'',r'                                  °
  561.   '''Commands "C124╜6,n" and "C124╜7,n" allow changing the nature of'''        °
  562.   '''existing fields.'',r'                                                     °
  563.   '''C124╜6,n can be used to change the field type. For example, the two       °
  564.  '''                                                                           °
  565.   '''field types are now defined as output only (col. 5 of array FLDS is       °
  566.   2)'''                                                                        °
  567.   '''To verify this, double click on the SAMPLE line of the Window list'       °
  568.  ''                                                                            °
  569.   '''and try to move the cursor. It should not respond. Now press Enter!       °
  570.  ''' 'do' '''We can re-define the field types with'',r'                        °
  571.   'show ''D124╜0 1 ╪ C124╜6 1 2 ╪ test'''                                      °
  572.   '''D124 re defines the first named field as input/output (0), and the'       °
  573.  ''                                                                            °
  574.   '''second field as numeric input and selectable (i.e. reverse video)''       °
  575.  ' '''as output (1). The C124 6 1 2 specifies the first field to be'''         °
  576.   '''associated with the 0 of D124, and the second field with the (1).''       °
  577.  ,r'                                                                           °
  578.   '''Now double click again on SAMPLE from the window list, and move the       °
  579.  '''                                                                           °
  580.   '''cursor to the first field. Enter there some characters. Then move t       °
  581.  he'''                                                                         °
  582.   '''cursor to row 1 column 1 of the green field and enter a two digit''       °
  583.  ' '''number. Then press Enter'',r' 'show ''C124╜3 ╪ test ╪ D124'''            °
  584.   '''If you have done as asked, D124 should have returned 0 0 2 1 3 1 2'       °
  585.  '' '''Look up on pages 184-185 for the meaning of this vector.''' 'do'        °
  586.   '''C124╜7,n can be used to change the field attributes'',r'                  °
  587.   'show ''D124╜146 ╪ C124╜7 1 2 ╪ test'''                                      °
  588.   '''We have changed the color of both fields.'''                              °
  589.   'show ''C124╜3 ╪ test ╪ D124'''                                              °
  590.   '''We can also change the color of individual elements of a single'''        °
  591.   '''field'',r' 'show ''D124╜44 65 37 123 59 210 233╪ C124╜7 1'''              °
  592.   '''Now take a  final look at this SAMPLE window'''                           °
  593. X 'show ''C124╜3 ╪ test ╪ D124''' 'end'                                        °
  594. XCa 0 %                                                                        °
  595. *(1992 1 14 9 44 42 488)                                                       °
  596.  Faddquote ÉFX 'u╜addquote w'                                                  °
  597.   'Σ Put quotes around a string, and double existing quotes'                   °
  598. X 'u╜ÉAV[40],((1+w=ÉAV[40])/w),ÉAV[40]'                                        °
  599. *(1992 1 14 9 44 42 488)                                                       °
  600. XFaq ÉFX 'u╜aq w' 'Σ Enclose quoted string' 'u╜Γaddquote w'                    °
  601. *(1992 1 14 9 44 42 488)                                                       °
  602.  Fav ÉFX 'av;a;n;i;ÉIO' 'Σ Display characters in the Atomic vector'            °
  603.   'ÉIO╜0' 'a╜22 78µ'' ''' 'n╜3 0«φ12 22µ1+∞256'                                °
  604.   'a[;,(6⌡∞12)°.+2 3 4]╜n' 'a[;6+6⌡∞12]╜φ12 22µÉAV'                            °
  605. X 'a[7 8 10 13;6]╜'' ''' 'a[14+∞8;68 69 70 72]╜'' ''' 'a'                      °
  606.  Acolors╜('BLACK')('DBLUE')('DGREEN')('DCYAN')('DRED')('DMAGENTA')('BROW       °
  607.  N')('GRAY')('DGRAY')('BLUE')('GREEN')('CYAN')('RED')('MAGENTA')('YELLOW       °
  608. X')('WHITE')                                                                   °
  609. *(1996 4 7 14 15 40 384)                                                       °
  610.  Fcopyright ÉFX 'copyright' 'Σ Copyright statement'                            °
  611.   '(10µ'' ''),''Copyright, Z. V. Jizba, 1995'',r'                              °
  612.   '''To see disclaimers, enter ÉCR ''''copyright''''''' 'do' '╕0'              °
  613.   '''This and subsequent workspaces labelled TEACHxx are made available'       °
  614.  ''                                                                            °
  615.   '''at no cost to anyone who desires to learn how to use effectively'''       °
  616.   '''the IBM/OS2 version of APL2.'',r'                                         °
  617.   '''This software is provided "AS IS" with no WARRANTY of any kind, eit       °
  618.  her'''                                                                        °
  619.   '''express or implied. Any risk in its use resides with you, the user        °
  620. Xof''' '''these tutorials.''' '''(PRESS ENTER to continue)'''                  °
  621. XCd 0 "                                                                        °
  622. *(1992 1 14 9 44 44 496)                                                       °
  623.  Fdate ÉFX 'u╜date w' 'Σ Format date and time of day' 'u╜«6╞w'                 °
  624. X 'u╜('' ''⌠u)Γu' 'u╜εu,■''-- .. '''                                           °
  625. XCdig 1 10 1234567890                                                          °
  626. *(1992 1 14 9 44 41 484)                                                       °
  627.  Fdo ÉFX 'do;t;e;b' 'Σ Expression driver' 'e╜''''' 'æ╜''       ''' 't╜æ'       °
  628.   '╕(^/'' ''=t)/0'                                                             °
  629.   '╕(('':''εt)doif ''b╜evaldd (+/^\'''' ''''=t)╟t'')/2'                        °
  630.   '''e╜ÉEM'' ÉEA t' '╕(0=µ,e)/2'                                               °
  631.   '''This is not a valid APL2 expression''' 'æ╜''*''' '╕(''?''⌠╞1╟æ)/2'        °
  632. X 'e' '╕2'                                                                     °
  633. *(1991 11 11 8 26 34 404)                                                      °
  634.  Fdoif ÉFX 'U╢╜V╢ doif W╢;t╢' 'Σ Rule' '╕(^/~U╢╜V╢)/0'                         °
  635. X '''U╢╜V╢ doif■ W╢'' ÉEA ''»V╢/W╢'''                                          °
  636. XNdos 0 ²26                                                                    °
  637. XCe 1 0                                                                        °
  638. *(1996 3 31 14 34 39 548)                                                      °
  639.  Fend ÉFX 'end' '''²²''' 'e╜''''' 'æ╜''       ''' 't╜æ' '╕(^/'' ''=t)/0'       °
  640.   '╕(('':''εt)doif ''b╜evaldd (+/^\'''' ''''=t)╟t'')/3'                        °
  641.   '''e╜ÉEM'' ÉEA t' '╕(0=µ,e)/0'                                               °
  642.   '''This is not a valid APL2 expression''' 'æ╜''*''' '╕(''?''⌠╞1╟æ)/0'        °
  643. X 'e'                                                                          °
  644. *(1992 1 14 9 44 42 488)                                                       °
  645. XFendd ÉFX 'endd' 'Σ End of document' '20µ''²''' 'do'                          °
  646. *(1995 12 10 14 37 48 544)                                                     °
  647.  Ferase ÉFX 'erase;t;DISPLAY;DOS;GO;COLORS;ATT;ATTS;SVOFFER' 't╜ÉNL 3'         °
  648.   't╜(~t^.εlc,'' '')≡t' 't╜(~t[;∞2]^.=''FS'')≡t'                               °
  649.   't╜ÉEX(~t[;∞5]^.=''TEACH'')≡t' 't╜ÉNL 2' 't╜ÉEX(~t^.εlc,'' '')≡t'            °
  650. X 't╜ÉNL 4' 't╜ÉEX(~t^.εlc,'' '')≡t'                                           °
  651. *(1992 1 14 9 44 43 492)                                                       °
  652.  Fevaldd ÉFX 'u╜evaldd w;c;n'                                                  °
  653.   'Σ Evaluate a direct definition expression' 'u╜0' 'n╜(w∞''Σ'')-1'            °
  654.   'c╜(((n╞w)⌠'':'')Γn╞w),Γ''ΣDD '',(n+1)╟w' '╕(label╞c)/0'                     °
  655.   '╕((2=µc)doif ''u╜showdd 1╙c'')/0'                                           °
  656.   '╕((3=ÉNC╞c)doif ''u╜⌡µÉ╜(╞c),'''' is already defined.'''''')/0'             °
  657.   '╕((3=µc)doif ''u╜simdd c'')/0' 'c╜(Γ''α∙ aw'')replace■c'                    °
  658.   'u╜ε''u╜'',((''a''εεc[2 3 4])/''a ''),(╞c),'' w;t;b'''                       °
  659.   'u╜u(5πc)(''b╜(t╜'',(3πc),'')/'',addquote ''u╜'',4πc)'                       °
  660. X 'u╜u,''╕(t doif b)/0''(''u╜'',2πc)' 'u╜╧ÉFX u'                               °
  661. *(1992 1 14 9 44 43 492)                                                       °
  662.  Fexit ÉFX 'exit w' 'Σ Exit if there are too many suspended functions'         °
  663. X '╕((10>µÉLC)doif ''w'')/0' '''Please re-enter '',w' '╕'                      °
  664. XCf 1 2  {                                                                     °
  665.  Afonts╜('GOTENG')('GOTGER')('GOTITA')('GRESER')('GRESIM')('MARKERS')('M       °
  666.  ODSIM')('ROMDUP')('ROMDUPF')('ROMITA')('ROMITAB')('ROMSER')('ROMSERB')(       °
  667.  'ROMSIM')('ROMSIMM')('SANSER')('SANSERF')('SCRIPT')('THKRNDF')('THKRNDO       °
  668. X')('THKSQUF')('THKSQUO')                                                      °
  669. XCfpath 1 12 C:\APL2\AVF\                                                      °
  670. XCg 1 2  }                                                                     °
  671. *(1995 12 18 15 37 48 580)                                                     °
  672.  Fget ÉFX 'u╜v get w;t;ÉPR' 'Σ Prompt for response from keyboard'              °
  673.   't╜(0=ÉNC ''V'')doif ''V╜1'' ╪ ÉPR╜''''' 'w╜w,(~²1╞v)/'': '''                °
  674.   'L0:æ╜w' 't╜æ' '╕((''╕''=(µw)╟t)doif ''╕'')/0' '╕(^/'' ''=w)/L1'             °
  675.   '╕((~w╧(µw)╞t)doif ''''''PLEASE DO NOT BACKSPACE'''''')/L0'                  °
  676.   't╜(µw)╟t' 'L1:u╜(²1+(,'' ''⌠t)∞1)╟t' '╕(1╞v)/0' 't╜(u⌠'' '')Γu'             °
  677. X 'u╜(µt),(Γu),t'                                                              °
  678. *(1991 11 11 8 25 11 308)                                                      °
  679.  Fglobals ÉFX 'globals' 'Σ Initialize useful global variables' 'r╜2╙ÉTC'       °
  680.   'q╜40╙ÉAV' 's╜Φp╜'' '',d╜35╙ÉAV' 'uc╜''ABCDEFGHIJKLMNOPQRSTUVWXYZ'''         °
  681.   'lc╜''abcdefghijklmnopqrstuvwxyz''' 'dig╜''1234567890'''                     °
  682. X 'g╜'' '',h╜126╙ÉAV' 'f╜ÉAV[33 124]' 'a╜38╙ÉAV'                               °
  683. XCh 0 }                                                                        °
  684. *(1992 8 10 10 44 11 380)                                                      °
  685.  Findex ÉFX 'U╜V index W;A;C;H;I;T' 'Σ List contents of an AP 211 file'        °
  686.   'T╜~(1<╧W)doif ''H╜2πW'' ''W╜1πW''' 'T╜T doif ''H╜''''FUNCTION'''''''        °
  687.   'T╜(ΓW)ε''DOCS'' ''UTILITY'' ''HELP'' ''TUTOR'''                             °
  688.   'T╜T doif ''W╜path,W,''''.211''''''' '1 OPEN 211' 'D211╜''USE'' W'           °
  689.   '''File '',W,'' has record length='',1╟D211'                                 °
  690.   'D211╜''LIST'' ''NAMES''' 'U╜D211'                                           °
  691.   '╕((0=╧U)doif ''U╜''''Unknown file'''''')/0' 'C╜1╟µU╜U[I╜ÉAV√U;]'            °
  692.   '╕((0=ÉNC ''V'')doif ''CLOSE 211'')/0' 'U╜(C╞H),[1]ul,[1]U'                  °
  693.   '╕((0=1╞V)doif ''U╜0 0 2 tab U'' ''CLOSE 211'')/0'                           °
  694.   'D211╜''LIST'' ''ATTS''' 'A╜D211'                                            °
  695.   'A╜(''SZ'' ''ID'' ''DATE'' ''mo'' ''d'' ''TIME'' ''m'' ''s'' ''ms''),[       °
  696.  1]ul,[1]A[I;]' 'V╜(Vε0,(∞9),-∞9)/V' 'U╜U,«A[;(0⌠V)/|V]'                       °
  697.   '╕((0εV)doif ''CLOSE 211'')/0'                                               °
  698.   'T╜~(0<╛/V)doif ''U╜U[∞2;],[1](2 0╟U)[√(2 0╟A)[;|V];]'''                     °
  699.   'T╜T doif ''U╜U[∞2;],[1](2 0╟U)[ⁿ(2 0╟A)[;|V];]''' 'T╜ÉDL 1'                 °
  700. X 'CLOSE 211'                                                                  °
  701. *(1991 11 11 8 25 12 312)                                                      °
  702.  Finitialize ÉFX 'initialize;t' 'Σ  Initialize workspace' 'erase'              °
  703. X 'globals'                                                                    °
  704. *(1992 1 14 9 44 41 484)                                                       °
  705.  Fkeys ÉFX 'keys' 'Σ Display keyboard'                                         °
  706.   '''        1  2  3  4  5  6  7  8  9  0  +  ⌡'''                             °
  707.   '''SHFT ╒  ■  ²  <  ≤  =  ≥  >  ⌠  δ  ^  -  ÷'''                             °
  708.   '''ALT  ╘  ƒ  ·  ⁿ  √  Φ  φ  Θ  ╡  τ  σ  !  Æ''' ''''''                      °
  709.   '''         Q  W  E  R  T  Y  U  I  O  P  ╜  ╙  ╧'''                         °
  710.   '''SHFT     ?  ∙  ε  µ  ~  ╞  ╟  ∞  Ω  *  ╕  ╨  ╤'''                         °
  711.   '''ALT      q  w  e  r  t  y  u  i  o  p  æ  ≈  ╥'''                         °
  712.   '''CTRL     ┌  ┬  ┐              ╔  ╦  ╗''' ''''''                           °
  713.   '''          A  S  D  F  G  H  J  K  L  [  ]'''                              °
  714.   '''SHFT      α  ⌐  ╛  _  ╖  ╢  °  ''''  É  (  )'''                           °
  715.   '''ALT       a  s  d  f  g  h  j  k  l  »  «'''                              °
  716.   '''CTRL     ├  ┼  ┤       ─  ═    ╠  ╬  ╣''' ''''''                          °
  717.   '''           Z  X  C  V  B  N  M  ,  .  /'''                                °
  718.   '''SHFT       Γ  π  ∩  ¼  ¥  ÿ  |  ;  :  \'''                                °
  719.   '''ALT        z  x  c  v  b  n  m  Σ  ±  ≡'''                                °
  720.   '''CTRL      └  ┴  ┘  │  ║      ╚  ╩  ╝''' ''''''                            °
  721. X '''Toggle switch to ASCII is CTL-BACKSPACE''' '''CTRL+G gives beep'''        °
  722. *(1992 1 14 9 44 43 492)                                                       °
  723.  Flabel ÉFX 'u╜label w'                                                        °
  724.   'Σ Return 1 if w is not a valid character string label (also excludes        °
  725. Xl.c.)' '╕(u╜(1<µµw)δ1<╧w)/0' '╕(u╜~^/wεlc,uc,dig)/0' 'u╜w[1]εlc,dig'          °
  726. XClc 1 26 abcdefghijklmnopqrstuvwxyz                                           °
  727.  Nmodes 2 9 10 4 320 200 4 8 1 70 19 200 222 5 320 200 4 8 1 70 19 200         °
  728.   222 6 640 200 2 8 1 70 19 100 222 13 320 200 16 8 1 70 19 200 222 14         °
  729.   640 200 16 8 1 70 19 100 222 15 640 350 4 8 1 70 19 100 127 16 640 350       °
  730.   16 8 1 70 19 100 127 17 640 480 2 8 1 70 19 100 98 18 640 480 16 8 1         °
  731. X 70 19 100 98                                                                 °
  732. *(1992 1 14 9 44 44 496)                                                       °
  733.  Fnon ÉFX 'non;t;rc;et;r'                                                      °
  734.   'Σ Ignore invalid keyboard entries, but evaluate valid APL2 expression       °
  735.  s' 'æ╜''       ''' 't╜æ' '╕(0=µ(t⌠'' '')/t)/0' '(rc et r)╜ÉEC t'              °
  736. X '╕(0=rc)/2' '╕((1=rc)doif ''r'')/2' '╕2'                                     °
  737. *(1992 1 14 9 44 43 492)                                                       °
  738.  Fnotb ÉFX 'u╜notb w' 'Σ Remove trailing blanks'                               °
  739.   '╕((1<╧w)doif ''u╜notb■ w'')/0' '╕((1<µµw)doif ''u╜πnotb Γ[2]w'')/0'         °
  740. X 'u╜(1-(,'' ''⌠Φw)∞1)╟w'                                                      °
  741. XCp 1 2  "                                                                     °
  742. *(1996 6 6 14 2 7 204)                                                         °
  743.  Fpanela ÉFX 'panela;D;T;C124;D124'                                            °
  744.   'Σ Full screen Auxilliary processor 124'                                     °
  745.   'T╜124 SVOFFER ''D124'' ''C124'''                                            °
  746.   'D╜4 6µ1 1 1 2000 2 7 10 5 10 25 2 31 2 45 20 4 2 79 17 20 4 50 2 127'       °
  747.   'D124╜D' 'C124╜1' 'D124╜''Press Enter twice''' 'C124╜2 1' 'C124╜3 1'         °
  748.   'D124╜1 51µ''THE FULL SCREEN MANAGEMENT AUXILLIARY PROCESSOR 124'''          °
  749. X 'C124╜4 1' 'C124╜3 1'                                                        °
  750. *(1996 6 6 14 5 52 396)                                                        °
  751.  Fpanelb ÉFX 'panelb;D;T;C124;D124'                                            °
  752.   'Σ Full screen Auxilliary processor 124'                                     °
  753.   'T╜124 SVOFFER ''D124'' ''C124'''                                            °
  754.   'D╜4 6µ1 1 1 2000 2 7 10 5 10 25 2 31 2 45 20 4 2 79 17 20 4 50 2 127'       °
  755.   'D124╜D' 'C124╜1' 'D124╜''Press Enter twice''' 'C124╜2 1' 'C124╜3 1'         °
  756.   'D124╜1 51µ''THE FULL SCREEN MANAGEMENT AUXILLIARY PROCESSOR 124'''          °
  757. X 'C124╜4 1' 'C124╜2 1'                                                        °
  758. XCpath 1 13 C:\APL2\WORK\                                                      °
  759. *(1992 1 14 9 44 44 496)                                                       °
  760.  Fpause ÉFX 'v pause w;t'                                                      °
  761.   'Σ Pause, then print w v spaces right and return'                            °
  762. X 't╜(0=ÉNC ''v'')doif ''v╜6''' 'do' '(vµ'' ''),w' 'do'                        °
  763. XCq 0 '                                                                        °
  764. XCr 0                                                                         °
  765. *(1992 1 14 9 44 43 492)                                                       °
  766.  Freplace ÉFX 'u╜v replace w;i;r;s' 'Σ  Replace elements in v in w'            °
  767.   'i╜Γ∞µu╜w' 's╜2πv╜(v⌠'' '')Γv' 'i╜⌡r╜i⌡■Γ[1]w°.=╞v'                          °
  768. X 'u[(εi)/εr]╜s[(εi)/εi⌡■∞µs]'                                                 °
  769. *(1992 1 14 9 44 44 496)                                                       °
  770.  Fround ÉFX 'u╜v round w' 'Σ Half adjust w to vth decimal'                     °
  771. X 'u╜(╛0.5+w⌡10*v)÷10*v'                                                       °
  772. XCs 1 2 "                                                                      °
  773. *(1992 8 10 10 58 49 588)                                                      °
  774.  Fshared ÉFX 'U╜shared;T;C2;D2;E2'                                             °
  775.   'Σ List all shared variables currently active'                               °
  776.   'T╜2 ÉSVO■''C2'' ''D2'' ''E2'''                                              °
  777.   '╕((δ/2⌠T╜ÉSVO■''C2'' ''D2'' ''E2'')doif ''''''AP 2 not active'''''')/       °
  778. X0' 'C2╜0' 'U╜D2[;4]' 'U╜((εsv)εU)/εsv'                                        °
  779. *(1991 11 11 8 25 12 312)                                                      °
  780.  Fshow ÉFX '╢v show ╢w;╢t;╢b' 'Σ Display and execute ╢w'                       °
  781.   '╢t╜(0=ÉNC ''╢v'')doif ''╢v╜0'''                                             °
  782.   '╕((0=╧╢w)doif ''show ╢w,'''' '''''')/0'                                     °
  783.   '╕((1<╧╢w)doif ''╢v show■ ╢w'')/0' '''      '',╢w'                           °
  784. X '╕((╢v^'':''ε╢w)doif ''╢t╜evaldd ╢w'')/L0' '''ÉEM'' ÉEA ╢w' 'L0:do'          °
  785. *(1992 1 14 9 44 44 496)                                                       °
  786.  Fshowdd ÉFX 'u╜showdd w;a;b;c;r'                                              °
  787.   'Σ  Display a direct definition function'                                    °
  788.   '╕((1=╧w)doif ''u╜showdd Γw'')/u╜0'                                          °
  789.   '╕((3⌠ÉNC╞w)doif ''(ε╞w),'''' is not a function'''''')/0'                    °
  790.   'c╜Γ[2]ÉCR╞w' 'c╜notb(2╞c),(Γ''aw α∙'')replace■2╟c'                          °
  791.   '╕((~''ΣDD''╧3╞2πc)doif ''''''Not a direct definition function'''''')/       °
  792.  0' 'u╜1' 'b╜('' ''⌠╞c)Γ╞c' 'a╜''      ''' 'r╜2╟3πc'                           °
  793.   '╕((3=µc)doif ''a,(╞w),'''':'''',r,(3<µ2πc)/''''   Σ'''',3╟2πc'')/0'         °
  794.   'a╜a,(╞w),'':'',(2╟5πc),'':''' 'b╜(+\r=''('')-+\r='')''' 'b╜b∞0'             °
  795. X 'a╜a,(²3╟(b-1)╞3╟r),'':'',2╟»(b+2)╟r' 'a,(3<µ2πc)/''  Σ'',3╟2πc'             °
  796. *(1992 1 14 9 44 44 496)                                                       °
  797.  Fshowfn ÉFX 'u╜v showfn w;f;n;t;ÉIO' 'Σ Simulate the STSC ÉVR command'        °
  798.   't╜(0=ÉNC ''v'')doif ''v╜,0''' 'ÉIO╜0'                                       °
  799.   'u╜''      '',''╖'',w,''[É]'',(╞v)╞''╖''' 'n╜1╞µf╜ÉCR w'                     °
  800.   'v╜v[0],((1╟v)ε∞n)/1╟v' 'n╜«∞n' 'n╜(n⌠'' '')Γn'                              °
  801.   'f╜(π''['',■n,■Γ''] ''),f'                                                   °
  802.   't╜(1<µ,v)doif ''f╜f[1╟v;]'' ''u╜''''''''''' 'u╜²1╟u,r,,f,r'                 °
  803. X 'u╜((-+/^\'' ''=Φu)╟u),('' ''(r,''      ╖'',date 2 ÉAT w))[╞v]'              °
  804. *(1992 1 14 9 44 45 500)                                                       °
  805.  Fsimdd ÉFX 'u╜simdd w;e' 'Σ Simple direct definition mode' 'u╜0'              °
  806.   '╕((0⌠ÉNC╞w)doif ''''''Already defined'''''')/0' 'e╜''α''ε2πw'               °
  807.   'w[2]╜Γ''u╜'',''α∙ aw'' replace 2πw' 'w╜w[1 3 2]'                            °
  808. X 'w[1]╜Γε''u╜'',(e/''a ''),w[1],'' w''' 'u╜╧ÉFX w'                            °
  809. XAsv╜(100 211 80 206)(120 210 124)                                             °
  810. XCt 1 16          TEACH10                                                      °
  811. *(1992 6 3 9 59 17 424)                                                        °
  812.  Ftab ÉFX 'U╜V tab W;T;A;B;C;D;E;F;G;M;ÉPW' 'Σ Tabulate list W'                °
  813.   'T╜(0=ÉNC ''V'')doif ''V╜0''' 'M╜''Invalid data for tabulation'''            °
  814.   'V╜4╞V' 'ÉPW╜130╛30⌐G╜V[2]+79⌡V[2]=0'                                        °
  815.   'L1:╕((1<╧W)doif ''''''W╜∞0'''' ÉEA ''''W╜πW'''''')/L1'                      °
  816.   '╕(((0=µεW)δ2<µµW)doif ''U╜(~V╧4╞0)/M'')/0'                                  °
  817.   'T╜(1≥µµU╜«W)doif ''U╜πW╜(U⌠'''' '''')ΓU'''                                  °
  818.   'T╜(0<V[1])doif ''U╜(«(Φ1,╞µW)µ(V[3]µ'''' ''''),∞(╞µW)-V[3]),'''' ''''       °
  819.  ,U''' '╕(G<30)/0' 'T╜(F╜µεV[4])+C╜1╟B╜µA╜(V[3],0)╟U'                          °
  820.   'T╜⌐(1╞B)÷1⌐╛(ÉPW+F)÷T' 'U╜(E╜(V[3],C)╞U),[1](B╜T,1╟B)╞A'                    °
  821.   '''D╜εV[4]'' ÉEA ''D╜ÉAV[εV[4]+33⌡V[4]=0]''' 'L0:A╜(T,0)╟A'                  °
  822. X '╕(0=1╞µA)/0' 'U╜U,(((T+V[3]),µD)µD),E,[1]B╞A' '╕L0'                         °
  823. *(1996 6 15 13 15 10 300)                                                      °
  824.  Ftest ÉFX 'test;T' 'Σ test return code' '╕(0=T╜C124)/0'                       °
  825. X '''SESSION ABORTED: The return code is '',T ╪ ╕'                             °
  826. XCuc 1 26 ABCDEFGHIJKLMNOPQRSTUVWXYZ                                           °
  827. *(1994 3 15 11 25 49 468)                                                      °
  828.  Fucf ÉFX 'U╜ucf W;T;R;B;N'                                                    °
  829.   'Σ Convert all lower case text in W to upper case' 'R╜µW'                    °
  830.   '╕((1<╧,W)doif ''U╜Rµucf■ ,W'')/0' 'T╜lc∞W╜,W' 'N╜(B╜T<27)/∞µW'              °
  831. X 'W[N]╜uc[B/T]' 'U╜RµW'                                                       °
  832. XCul 0 ²                                                                       °
  833. *(1996 6 13 13 16 24 352)                                                      °
  834.  Fwarna ÉFX 'warna;T' 'Σ clear AP124 and explai'                               °
  835. X 'T╜ÉSVR■''C124'' ''D124''' 'T╜ÉEX■''C124'' ''D124'''                         °
  836. *(1996 6 15 18 50 30 540)                                                      °
  837.  Fwarnb ÉFX 'warnb;T' 'Σ clear AP124 and explain'                              °
  838.   '''WARNING: As you study this lesson, try to respond to all requests.'       °
  839.  ',r'                                                                          °
  840.   '''Of course as in all these tutorials, you are encouraged to experime       °
  841.  nt'''                                                                         °
  842.   '''at any pause. However, on some AP124 commands the screen may FREEZE       °
  843.  .''' '''If that happens, do the following:'',r'                               °
  844.   ''' 1. Press one of the "gray" keys, such as Home or End'''                  °
  845.   ''' 2. Click on the QUAD symbol on the APL2 screen'',r'                      °
  846.   '''If this fails to continue the lesson, then try the following:'',r'        °
  847.   ''' 1. Select the SIGNAL pull down menu and do and interrupt'''              °
  848.   ''' 2. Branch to zero (╕0)''' ''' 3. Press Enter'',r'                        °
  849.   '''If this also fails, you will have to re-start the lesson, but befor       °
  850.  e'''                                                                          °
  851.   '''you do, be sure to check the WINDOW LIST and make sure there are no       °
  852. X''' '''active AP124 windows left.''' 'do'                                     °
  853. *(1996 6 13 13 34 23 420)                                                      °
  854.  Fwarning ÉFX 'warning;T' 'Σ clear AP124 and explai' 'warna' 'warnb'           °
  855. X 'end'                                                                        °
  856.