home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / teachapl.zip / teach50.zip / TEACH50.ATF
Text File  |  1996-09-13  |  48KB  |  587 lines

  1. XNÉIO 0 1                                                                      °
  2. XNÉCT 0 1.000000000000011E²13                                                  °
  3. XCÉFC 1 6 .,*0_²                                                               °
  4. XNÉRL 0 1725004503                                                             °
  5. XCÉPR 0                                                                        °
  6. XCÉLX 1 5 TEACH                                                                °
  7. *(1996 8 9 14 14 19 320)                                                       °
  8.  FALLPATS ÉFX 'ALLPATS;I;B;T;X;D207' 'Σ Display the 19 color patterns'         °
  9.   'T╜open ''ALL PATTERNS''' '╕(0<ÉNC ''pats'')/L1 ╪ pats╜19'                   °
  10.   'L1:I╜1 ╪ B╜25 400' 'D207╜''CLEAR'' '''''                                    °
  11.   'L0:X╜5 2µB,(B+50 0),(B+50 50),(B+0 50)'                                     °
  12.   'D207╜''move''(B+²18 25)''write''(«I)'                                       °
  13.   'D207╜''PATTERN'' I ''BEGAREA'' '''' ''DRAW'' X ''ENDAREA'' '''''            °
  14.   'B╜B+70 0' '╕(pats<I╜I+1)/L2' '╕(0⌠10|I-1)/L0'                               °
  15. X 'B╜25,400-60⌡╛I÷10 ╪ ╕L0' 'L2:D207╜''view'' '''' ''wait'' '''''              °
  16. *(1992 2 29 8 32 29 448)                                                       °
  17.  FDISPLAY ÉFX 'D╜S DISPLAY A;ÉIO;R;C;HL;HC;HT;HB;VL;VB;V;W;N;B'                °
  18.   'Σ DISPLAY A GENERAL ARRAY IN PICTORIAL FORM'                                °
  19.   'Σ  NORMAL CALL IS MONADIC.  DYADIC CALL USED ONLY IN'                       °
  20.   'Σ    RECURSION TO SPECIFY DISPLAY RANK, SHAPE, AND DEPTH.' 'ÉIO╜0'          °
  21.   '»(0=ÉNC ''S'')/''S╜µA''' 'R╜╞µ,S                   Σ PSEUDO RANK.'          °
  22.   'C╜''┐┌└┘''                 Σ UR, UL, LL, AND LR CORNERS.'                   °
  23.   'HL╜''─''                   Σ HORIZONTAL LINE.'                              °
  24.   'HC╜HL,''Θ╕'',HL,''~+ε''      Σ HORIZONTAL BORDERS.'                         °
  25.   'HT╜HC[(0<R)⌡1+0<╞²1╞,S]' 'ΣW╜,0╧■╞0µΓ(1⌐µA)╞A'                              °
  26.   'HB╜HC[3+3╛(''2⌡~A╧«A'' ÉEA ''1+╞ε0⌡(1⌐⌡/µA)╞,A'')+3⌡1<µµS]'                 °
  27.   'VL╜''│''                   Σ VERTICAL LINE.'                                °
  28.   'VB╜VL,''Φ╟''               Σ VERTICAL BORDER.'                              °
  29.   'V╜VB[(1<R)⌡1+0<²1╞²1╟,S]'                                                   °
  30.   '»(0εµA)/''A╜(1⌐µA)µΓ╞A''   Σ SHOW PROTOTYPE OF EMPTIES.'                    °
  31.   '╕(1<╧A)/GEN' '╕(2<µµA)/D3'                                                  °
  32.   'D╜«A                     Σ SIMPLE ARRAYS.' 'W╜1╞µD╜(²2╞1 1,µD)µD'           °
  33.   'N╜²1+1╟µD' '╕(0=µµA)/SS'                                                    °
  34.   'D╜(C[1],V,((W-1)µVL),C[2]),((HT,NµHL),[0]D,[0]HB,NµHL),C[0],(WµVL),C[       °
  35.  3]' '╕0' 'SS:HB╜((0 '' '')=╞0µΓA)/'' -'''                                     °
  36.   'D╜'' '',('' '',[0]D,[0]HB,Nµ'' ''),'' ''' '╕0'                              °
  37.   'GEN:D╜«DISPLAY■A          Σ ENCLOSED ...' 'N╜Dδ.⌠'' '''                     °
  38.   'D╜(Nδ~1ΦN)≡D' 'D╜(δ≡~''  ''╤D)/D' 'D╜((1,µS)µS)DISPLAY D'                   °
  39.   '╕(2≥µ,S)╟D3E,0' 'D3:D╜0 ²1╟0 1╟«ΓA         Σ MULT-DIMENSIONAL ...'          °
  40.   'W╜1╞µD' 'N╜²1+1╟µD'                                                         °
  41.   'D╜(C[1],V,((W-1)µVL),C[2]),((HT,NµHL),[0]D,[0]HB,NµHL),C[0],(WµVL),C[       °
  42.  3]' 'D3E:N╜²2+µ,S'                                                            °
  43. X 'V╜C[Nµ1],[0]VB[1+0<²2╟,S],[0](((²3+╞µD),N)µVL),[0]C[Nµ2]' 'D╜V,D'           °
  44. *(1992 8 14 10 7 40 364)                                                       °
  45.  FDOS ÉFX 'DOS W;T;D100;D2' 'Σ Simulation of DOS prompt'                       °
  46.   'T╜100 ÉSVO ''D100'''                                                        °
  47.   'T╜(2⌠ÉSVO ''D100'')doif ''''''AP100.COM'''' opentwo 1'' ''T╜100 ÉSVO        °
  48.  ''''D100''''''' '╕((0<µ(W⌠'' '')/W)doif ''D100╜W'')/0' 'L0:æ╜''C:>'''         °
  49. X '╕(^/'' ''=T╜3╟æ)/0' 'D100╜T' '╕L0'                                          °
  50. *(1996 8 11 12 47 46 560)                                                      °
  51.  FFILSC ÉFX 'FILSC W;S;T' 'Σ Fill screen with patterns W'                      °
  52.   '╕(2=ÉNC ''D207'')/L1 ╪ ''The graphic screen is not active'' ╪ ╕0'           °
  53.   'L1:D207╜''query'' '''' ╪ S╜4╞2╞1╟,3πD207 ╪ D207╜''move''(0 0)'              °
  54.   'L0:D207╜''PATTERN''(╞W)''BEGAREA'' '''' ''box'' S ''ENDAREA'' '''''         °
  55. X '╕(0<µW╜1╟W)/L0' 'D207╜''view'' '''''                                        °
  56. *(1992 2 29 8 32 30 452)                                                       °
  57.  FGO ÉFX 'GO;b;e;t' 'Σ Expression driver' 'L0:b╜e╜''''' 'æ╜''       '''        °
  58.   't╜æ' '╕(^/'' ''=t)/L0' '╕((^/'')OFF ''=5╞6╟t)doif ''exit'')/0'              °
  59.   '╕(('':''εt)doif ''b╜evaldd (+/^\'''' ''''=t)╟t'')/L0'                       °
  60.   '''e╜ÉEM'' ÉEA t' '╕(0=µ,e)/L0' '╕b/L0'                                      °
  61.   '''This is not a valid APL2 expression''' 'æ╜''*'''                          °
  62. X '╕(''?''⌠╞1╟æ)/L0' 'e' '╕L0'                                                 °
  63. XNR 2 6 2 100 150 400 200 150 300 200 50 300 300 100 150                       °
  64. *(1995 4 23 14 14 6 304)                                                       °
  65.  FSVOFFER ÉFX 'DC╜PID SVOFFER SV' 'SV╜(²2╞1 1,µSV)µSV╜πSV'                     °
  66.   '╕(2=ÉNC ''PID'')/DYADIC' 'DC╜ÉSVO SV ╪ ╕0'                                  °
  67.   'DYADIC:╕(1^.⌠DC╜PID ÉSVO SV)/END' 'ÉSVE╜15'                                 °
  68.   'CHECK:╕(1^.⌠DC╜ÉSVO SV)/END' '╕(0⌠ÉSVE)/CHECK'                              °
  69. X 'END:SV╜1 0 1 0 ÉSVC SV'                                                     °
  70. *(1996 8 12 13 27 31 428)                                                      °
  71.  FTEACH ÉFX 'TEACH' 'Σ Copyright Z V Jizba 1991; all rights reserved'          °
  72.   'copyright' 'initialize' 'warning' 'do'                                      °
  73.   'TEACH1  Σ Patterns in space filling commands'                               °
  74.   'TEACH2  Σ Commands BEGAREA and ENDAREA'                                     °
  75.   'TEACH3  Σ Generating new patterns by combination'                           °
  76.   'TEACH4  Σ Function FILSC filling the screen'                                °
  77.   'TEACH5  Σ Filling polygons with patterns'                                   °
  78. X 'TEACH6  Σ The command IMAGE' '''This is the end of this lesson'''           °
  79. *(1996 8 9 13 8 55 436)                                                        °
  80.  FTEACH1 ÉFX 'TEACH1;T;D207' 'Σ Space filling commands'                        °
  81.   '''SPACE FILLING COMMANDS'',r'                                               °
  82.   '''We have seen in the last lesson that some fonts are not just line''       °
  83.  '                                                                             °
  84.   '''drawings. In these fonts, which are defined by closed polygons, the       °
  85.  '''                                                                           °
  86.   '''inner space is filled out with the foreground (black) color.'',r'         °
  87.   '''In this lesson we will study the process of filling space by patter       °
  88.  ns.'''                                                                        °
  89.   '''When we studied command QUERY, the seventh item specifies the numbe       °
  90.  r''' '''of different fill patterns.''' 'do'                                   °
  91.   'show ''T╜TEST ''''query'''' '''''''' ╪ ''''Number of patterns='''',pa       °
  92.  ts╜7╙,3πT'''                                                                  °
  93.   '''In this version of APL2OS2 there are'',pats,''different ways to fil       °
  94.  l space''' '''with patterns.''' 'do'                                          °
  95.   '''As usual, we begin by finding out the default pattern''' 'do'             °
  96.   'show ''T╜TEST ''''PATTERN'''' '''''''' ╪ DISPLAY T'''                       °
  97.   '''The default pattern is 0 which is a solid fill. The command PATTERN       °
  98.  '''                                                                           °
  99.   '''takes only one argument. It is an integer scalar in the range 1-'',       °
  100.  pats'                                                                         °
  101.   '''(or whathever the maximum range of the # of patterns). If the value       °
  102.  '''                                                                           °
  103.   '''of the argument is a zero (0), the default solid fill will be used.       °
  104.  ''' 'do'                                                                      °
  105.   '''Function ALLPATS will display all the'',pats,''patterns that are av       °
  106.  ailable''' '''here.'',r' 'show ''ALLPATS'''                                   °
  107.   '''Of particular interest are patterns 15 (background) and 16 black'''       °
  108. X '''(foreground)''' 'end'                                                     °
  109. *(1996 8 11 11 53 29 512)                                                      °
  110.  FTEACH2 ÉFX 'TEACH2;T;D207' 'Σ BEGAREA and ENDAREA'                           °
  111.   '''COMMANDS BEGAREA AND ENDAREA'',r'                                         °
  112.   '''To fill out an area with a pattern, one has to do three things:'',r       °
  113.  ' ''' 1. Specify the pattrern to be used'''                                   °
  114.   ''' 2. Draw the area to be filled'''                                         °
  115.   ''' 3. Give the commands to fill out the area with the pattern'',r'          °
  116.   '''We have already learned how to specify the desired pattern. We also       °
  117.  '''                                                                           °
  118.   '''know how to draw a closed region, such as a circle. We need command       °
  119.  s''' '''to specify how to fill out that region.'',r'                          °
  120.   '''This is done with two commands: BEGAREA and ENDAREA. Both commands'       °
  121.  ''                                                                            °
  122.   '''take a null string as a right argument. The BEGAREA command must be       °
  123.  '''                                                                           °
  124.   '''given before drawing the closed polygon, and the ENDAREA must be'''       °
  125.   '''invoked upon completion of the polygonal drawing. Here is an exampl       °
  126.  e''' 'do'                                                                     °
  127.   'show ''T╜open ''''SPACE FILLING PATTERNS'''''' ''D207╜''''PATTERN''''       °
  128.   8'''                                                                         °
  129.   'T╜''D207╜''''BEGAREA'''' '''''''' ''''ARC'''' (200 200 50 50 0 360) '       °
  130.  '''ENDAREA'''' ''''''''''' 'show T,'' ╪ D207╜''''view'''' '''''''''''         °
  131.   '''Note that there is no boundary marking the edges of the pattern. To       °
  132.  '''                                                                           °
  133.   '''draw both the boundary and the pattern, one has to repeat the ARC''       °
  134.  '                                                                             °
  135.   '''call twice; once between the BEGAREA and ENDAREA commands and once'       °
  136.  '' '''outside.''' 'do'                                                        °
  137.   'show ''D207╜''''CLEAR'''' '''''''' ''''pattern'''' 8'''                     °
  138.   'show ''D207╜''''ARC'''' (200 200 50 50 0 360) '',5╟T'                       °
  139.   'D207╜''view'' '''''                                                         °
  140.   '''Since the space filling commands will apply to all line drawings,''       °
  141.  ' '''they should work for the vector fonts as well'',r'                       °
  142.   'show ''T╜getfont 1 21 ╪ D207╜''''move'''' (100 100) ''''font'''' ('''       °
  143.  'THKSQUF'''' 30)'''                                                           °
  144.   'show ''D207╜''''pattern'''' 11 ''''write'''' ''''TEST'''' ''''view'''       °
  145.  ' '''''''''''                                                                 °
  146.   '''Again, to also obtain an outline of the characters, one would have        °
  147.  to'''                                                                         °
  148.   '''write the text twice, once inside "begarea-endarea" and once outsid       °
  149.  e.'''                                                                         °
  150.   '''However, for the filled fonts (ROMDUPF, SANSERF, THKRNDF, THKSQF),        °
  151.  the'''                                                                        °
  152.   '''procedure is to write the unfilled text (ROMDUP, ROMSER, THKRNDO, T       °
  153.  HKSQUO)'''                                                                    °
  154.   '''followed by the pattern and a second write inside "begarea-endarea"       °
  155.  .''' 'do'                                                                     °
  156.   '''It is also of interest to note that the space filling can be applie       °
  157.  d''' '''to text that is not normally filled out''' 'do'                       °
  158.   'show ''D207╜''''move'''' (300 100) ''''font'''' (''''GOTENG'''' 30)''       °
  159.  ' 'show ''D207╜''''write'''' ''''TEST'''' ''''view'''' '''''''''''            °
  160.   '''And now, the same write command but this time within "begarea-endar       °
  161.  ea"''' 'do'                                                                   °
  162.   'show ''D207╜''''begarea'''' '''''''' ''''write'''' ''''TEST'''' ''''e       °
  163. Xndarea'''' '''''''' ''''view'''' ''''''''''' '''__'''                         °
  164. *(1996 8 11 12 16 13 304)                                                      °
  165.  FTEACH3 ÉFX 'TEACH3;T;D207' 'Σ Combining patterns'                            °
  166.   '''COMBINING PATTERNS'',r'                                                   °
  167.   '''If two closed areas overlap, the patterns combine in a specific way       °
  168.  .'''                                                                          °
  169.   '''Function TESTPAT can be used to evaluate how two or more patterns''       °
  170.  ' '''combine. This function has as the right argument one or more'''          °
  171.   '''integers in the range of available patterns. It produces a display        °
  172.  of'''                                                                         °
  173.   '''offset cicular areas containing the specified patterns. Here is a''       °
  174.  ' '''listing of this function.''' 'do' 'showfn ''TESTPAT'''                   °
  175.   'r,''Line[2] opens AP207, initializes the X coordinate of the first ci       °
  176.  rcle'''                                                                       °
  177.   '''and also initializes the returned variable U. Line [3] defines the'       °
  178.  ''                                                                            °
  179.   '''first pattern. Line [4] fills out the circular area with the patter       °
  180.  n.'''                                                                         °
  181.   '''Line [5] adds to variable U the return codes, updates to the next''       °
  182.  '                                                                             °
  183.   '''pattern (location and type) and branches to line [4] if there is'''       °
  184.   '''another pattern. Line [6] displays the graphic and removes the init       °
  185.  ial'''                                                                        °
  186.   '''null string. Line [7] is a pause to prevent the graph from flashing       °
  187.   out,'''                                                                      °
  188.   '''since the shared variable D207 is local to this function.'''              °
  189.   '''Let us see how this function works''' 'do'                                °
  190.   'show ''T╜TESTPAT 12 14 11 13'''                                             °
  191.   '''You may wish to try out several combination of patterns. (To see th       °
  192. Xe''' '''individual patterns, enter ALLPATS.)''' 'end'                         °
  193. *(1996 8 11 12 49 24 480)                                                      °
  194.  FTEACH4 ÉFX 'TEACH4;C;T;D207' 'Σ More on mixing'                              °
  195.   '''The number of different patterns that you can generate is almost'''       °
  196.   '''limitless. To help you to study what is available you can use funct       °
  197.  ion'''                                                                        °
  198.   '''FILSC. This function fills the screen with the specified pattern. T       °
  199.  he'''                                                                         °
  200.   '''function will work only if the graphic screen is active. The right'       °
  201.  ''                                                                            °
  202.   '''argument is the pattern number to be displayed. If more than one'''       °
  203.   '''integer is given as right argument, the patterns will be combined.'       °
  204.  '' 'do' 'T╜open ''FILL SCREEN'''                                              °
  205.   '''Go ahead, and try function FILSC now''' 'do'                              °
  206.   '''The more patterns you specify, the more the screen will fill up'''        °
  207. X '''with the foreground (black now) color.'',r' 'end'                         °
  208. *(1996 8 12 11 35 55 548)                                                      °
  209.  FTEACH5 ÉFX 'TEACH5;P;Q;T;D207'                                               °
  210.   'Σ Filling out open and complex polygons'                                    °
  211.   '''One question that may come up is what gets filled, if the area to b       °
  212.  e'''                                                                          °
  213.   '''covered is not a complete polygon, or if it is made up of intersect       °
  214.  ing''' '''lines. Let us try some examples''' 'do'                             °
  215.   'T╜open ''POLYGONS'''                                                        °
  216.   'show ''P╜3 2µ100 100 200 100 200 200'' ''D207╜''''DRAW'''' P ''''view       °
  217.  '''' ''''''''''' 'D207╜''CLEAR'' '''''                                        °
  218.   'show ''Q╜4 2µ100 150 400 200 300 100  50 300'' ''D207╜''''DRAW'''' Q        °
  219.  ''''view'''' ''''''''''' 'do'                                                 °
  220.   '''P is an incomplete triangle, and Q includes a triangle, but the lin       °
  221.  es''' '''extend beyond the vertices''' 'do' 'D207╜''CLEAR'' '''''             °
  222.   'show ''D207╜''''BEGAREA'''' '''''''' ''''DRAW'''' P ''''ENDAREA'''' '       °
  223.  ''''''' ''''view'''' ''''''''''' 'do' 'D207╜''CLEAR'' '''''                   °
  224.   'show ''D207╜''''BEGAREA'''' '''''''' ''''DRAW'''' Q ''''ENDAREA'''' '       °
  225.  ''''''' ''''view'''' '''''''''''                                              °
  226.   '''The area filled out is as if the endpoints of the incomplete polygo       °
  227.  n''' '''were connected.''' 'do'                                               °
  228.   '''What if we tried to fill out a five pointed star? Here is an exampl       °
  229.  e'',r' 'show ''R╜6 2µ100 150 400 200 150 300 200 50 300 300'''                °
  230.   'D207╜''CLEAR'' '''''                                                        °
  231.   'show ''D207╜''''DRAW'''' R ''''view'''' '''''''''''                         °
  232.   'D207╜''CLEAR'' '''''                                                        °
  233.   'show ''D207╜''''BEGAREA'''' '''''''' ''''DRAW'''' R ''''ENDAREA'''' '       °
  234.  ''''''' ''''view'''' '''''''''''                                              °
  235.   '''The rule is: Fill begins when a line of a (closed) polygon is sense       °
  236.  d,'''                                                                         °
  237.   '''and ends when a second line is detected. If another line is then ag       °
  238. Xain''' '''detected, another fill pattern begins.''' 'end'                     °
  239. *(1996 8 12 13 22 8 316)                                                       °
  240.  FTEACH6 ÉFX 'TEACH6;A;I;T;D207' 'Σ Using the IMAGE command'                   °
  241.   '''THE COMMAND IMAGE'',r'                                                    °
  242.   '''Until now we have defined graphic images by invoking a variety of''       °
  243.  '                                                                             °
  244.   '''commands that generate line drawings and fill patterns. There is'''       °
  245.   '''yet another way to generate images. Recall that a graphic image is'       °
  246.  ''                                                                            °
  247.   '''stored as an array of "pels". APL2 provides a way to retrieve this'       °
  248.  ''                                                                            °
  249.   '''array (or portions of it). The retrieved image must be visible on''       °
  250.  '                                                                             °
  251.   '''the screen at the time it is retrieved. Furthermore, it apparently'       °
  252.  '' '''must also be an APL2OS2 window.''' 'T╜open ''IMAGE''' 'do'              °
  253.   '''Let us suppose that we desire to display an image, of a line of tex       °
  254.  t.'''                                                                         °
  255.   '''We will retrieve the SCRIPT font and write the word "Test" on the''       °
  256.  ' '''graphic screen.''' 'do'                                                  °
  257.   'show ''T╜getfont 18 ╪ D207╜''''font''''(''''SCRIPT'''' 30)'''               °
  258.   'show ''D207╜''''MOVE'''' (100 20) ''''write'''' ''''Test'''' ''''view       °
  259.  '''' '''''''' ╪ T╜test'''                                                     °
  260.   '''We can capture the image of this text. To do that, we have to be su       °
  261.  re'''                                                                         °
  262.   '''the graphic screen is visible. Then we invoke the command IMAGE wit       °
  263.  h'''                                                                          °
  264.   '''the right argument specifying the box that contains the text.'''          °
  265.   'do'                                                                         °
  266.   'show ''D207╜''''view'''' '''''''' ╪ D207╜''''IMAGE'''' (100 20 200 50       °
  267.  )'''                                                                          °
  268.   '''Note that we issued the IMAGE command separately from the VIEW,'''        °
  269.   '''because this command may not be used in a multiple command sequence       °
  270.  .'',r'                                                                        °
  271.   '''The image array can now be retrieved from the second element of the       °
  272.  ''' '''return vector.''' 'do' 'show ''A╜2πD207 ╪ DISPLAYµA'''                 °
  273.   '''A is now an APL2 rank 2 character array. This array can be posted o       °
  274.  n''' '''the graphic screen using the IMAGE command''' 'do'                    °
  275.   'show ''D207╜''''MOVE'''' (100 200) ''''image'''' A ''''view'''' '''''       °
  276.  ''' ╪ T╜test'''                                                               °
  277.   '''We can manipulate A, and we can store it, and display it on any'''        °
  278.   '''graphic screen''' 'do'                                                    °
  279.   'show ''D207╜''''MOVE'''' (100 150) ''''IMAGE'''' (A,ΦA) ''''view''''        °
  280.  '''''''''''                                                                   °
  281.   '''Since the image array is rectangular, we can generate only rectangu       °
  282.  lar'''                                                                        °
  283.   '''areas without further processing. However, we have learned enough a       °
  284.  bout'''                                                                       °
  285.   '''space filling. The additional processing required to fill irregular       °
  286.  ''' '''areas with images or patterns is left to you as an exercise.'''        °
  287. X 'end'                                                                        °
  288. *(1996 8 9 13 25 32 412)                                                       °
  289.  FTEST ÉFX 'U╜V TEST W;T;D207'                                                 °
  290.   'Σ Test a sequence of graphic commands (W)'                                  °
  291.   'T╜open ''TEST PATTERNS''' 'D207╜W ╪ U╜D207 ╪ D207╜''view'' '''''            °
  292. X 'do'                                                                         °
  293. *(1996 8 11 11 41 47 536)                                                      °
  294.  FTESTPAT ÉFX 'U╜TESTPAT W;T;X;D207' 'Σ Display patterns W in circles'         °
  295.   'T╜open ''TEST COMBINED PATTERNS'' ╪ X╜200' 'L0:D207╜''PATTERN''(╞W)'        °
  296.   'D207╜''BEGAREA'' '''' ''ARC''(X,200 100 100 0 360)''ENDAREA'' '''''         °
  297. X 'U╜D207 ╪ W╜1╟W ╪ X╜X+50 ╪ ╕(0<µW)/L0' 'D207╜''view'' ''''' 'do'             °
  298. XCa 0 %                                                                        °
  299. *(1992 2 29 8 32 29 448)                                                       °
  300.  Faddquote ÉFX 'u╜addquote w'                                                  °
  301.   'Σ Put quotes around a string, and double existing quotes'                   °
  302. X 'u╜ÉAV[40],((1+w=ÉAV[40])/w),ÉAV[40]'                                        °
  303. XAaf╜('DEFAULT')('SCRIPT')                                                     °
  304. *(1992 2 29 8 32 29 448)                                                       °
  305. XFaq ÉFX 'u╜aq w' 'Σ Enclose quoted string' 'u╜Γaddquote w'                    °
  306. *(1992 2 29 8 32 30 452)                                                       °
  307.  Fav ÉFX 'av;a;n;i;ÉIO' 'Σ Display characters in the Atomic vector'            °
  308.   'ÉIO╜0' 'a╜22 78µ'' ''' 'n╜3 0«φ12 22µ1+∞256'                                °
  309.   'a[;,(6⌡∞12)°.+2 3 4]╜n' 'a[;6+6⌡∞12]╜φ12 22µÉAV'                            °
  310. X 'a[7 8 10 13;6]╜'' ''' 'a[14+∞8;68 69 70 72]╜'' ''' 'a'                      °
  311. *(1992 2 29 8 32 32 460)                                                       °
  312.  Fback ÉFX 'back;T' 'Σ Reset screen to 25⌡80 size' 'OPEN 124' 'C124╜0 3'       °
  313. X 'CLOSE 124 206'                                                              °
  314. *(1996 8 5 14 6 58 428)                                                        °
  315.  Fcopyright ÉFX 'copyright' 'Σ Copyright statement'                            °
  316.   '(10µ'' ''),''Copyright, Z. V. Jizba, 1995,1996'',r'                         °
  317.   '''To see disclaimers, enter ÉCR ''''copyright''''''' 'do' '╕0'              °
  318.   '''This and subsequent workspaces labelled TEACHxx are made available'       °
  319.  ''                                                                            °
  320.   '''at no cost to anyone who desires to learn how to use effectively'''       °
  321.   '''the IBM/OS2 version of APL2.'',r'                                         °
  322.   '''This software is provided "AS IS" with no WARRANTY of any kind, eit       °
  323.  her'''                                                                        °
  324.   '''express or implied. Any risk in its use resides with you, the user        °
  325. Xof''' '''these tutorials.''' '''(PRESS ENTER to continue)'''                  °
  326. XCd 0 "                                                                        °
  327. *(1992 2 29 8 32 33 464)                                                       °
  328.  Fdate ÉFX 'u╜date w' 'Σ Format date and time of day' 'u╜«6╞w'                 °
  329. X 'u╜('' ''⌠u)Γu' 'u╜εu,■''-- .. '''                                           °
  330. XCdig 1 10 1234567890                                                          °
  331. *(1992 2 29 8 32 28 444)                                                       °
  332.  Fdo ÉFX 'do;t;e;b' 'Σ Expression driver' 'e╜''''' 'æ╜''       ''' 't╜æ'       °
  333.   '╕(^/'' ''=t)/0'                                                             °
  334.   '╕(('':''εt)doif ''b╜evaldd (+/^\'''' ''''=t)╟t'')/2'                        °
  335.   '''e╜ÉEM'' ÉEA t' '╕(0=µ,e)/2'                                               °
  336.   '''This is not a valid APL2 expression''' 'æ╜''*''' '╕(''?''⌠╞1╟æ)/2'        °
  337. X 'e' '╕2'                                                                     °
  338. *(1992 2 29 8 32 28 444)                                                       °
  339.  Fdoif ÉFX 'U╢╜V╢ doif W╢;t╢' 'Σ Rule' '╕(^/~U╢╜V╢)/0'                         °
  340. X '''U╢╜V╢ doif■ W╢'' ÉEA ''»V╢/W╢'''                                          °
  341. XNdos 0 ²26                                                                    °
  342. *(1996 8 4 12 11 37 352)                                                       °
  343.  Fdropfont ÉFX 'U╜dropfont W;B;T' 'Σ drop fonts W'                             °
  344.   'U╜'''' ╪ ╕(0=ÉNC ''af'')/0 ╪ ╕(2=╧W)/L0' 'W╜,ΓW'                            °
  345.   'L0:af╜(~B╜afεW)/af' 'L1:╕(0=µW)/0'                                          °
  346. X 'L1:D207╜''fontdef''((1πW)²1) ╪ U╜U,D207' '╕(0<µW╜1╟W)/L1'                   °
  347. XCe 1 0                                                                        °
  348. *(1996 7 24 14 20 54 540)                                                      °
  349.  Fend ÉFX 'end' 'e╜''''' 'æ╜''       ''' 't╜æ' '╕(^/'' ''=t)/L0'               °
  350.   '╕(('':''εt)doif ''b╜evaldd (+/^\'''' ''''=t)╟t'')/3'                        °
  351.   '''e╜ÉEM'' ÉEA t' '╕(0=µ,e)/L0'                                              °
  352.   '''This is not a valid APL2 expression''' 'æ╜''*'''                          °
  353. X '╕(''?''⌠╞1╟æ)/L0' 'e' 'L0:''²²'''                                           °
  354. *(1992 2 29 8 32 30 452)                                                       °
  355. XFendd ÉFX 'endd' 'Σ End of document' '20µ''²''' 'do'                          °
  356. *(1996 9 13 13 38 9 392)                                                       °
  357.  Ferase ÉFX                                                                    °
  358.   'erase;t;b;DISPLAY;DOS;GO;FRAME;NODIST;SVOFFER;FONTS;ALLPATS;FILSC'          °
  359.   't╜ÉNL 3' 't╜(~t^.εlc,'' '')≡t'                                              °
  360.   't╜(~(t[;∞5]^.=''TEACH'')δt[;∞4]^.=''TEST'')≡t' 't╜ÉEX t' 't╜ÉNL 2'          °
  361. X 't╜ÉEX(~t^.εlc,'' '')≡t' 't╜ÉNL 4' 't╜ÉEX(~t^.εlc,'' '')≡t'                  °
  362. *(1992 2 29 8 32 32 460)                                                       °
  363.  Fevaldd ÉFX 'u╜evaldd w;c;n'                                                  °
  364.   'Σ Evaluate a direct definition expression' 'u╜0' 'n╜(w∞''Σ'')-1'            °
  365.   'c╜(((n╞w)⌠'':'')Γn╞w),Γ''ΣDD '',(n+1)╟w' '╕(label╞c)/0'                     °
  366.   '╕((2=µc)doif ''u╜showdd 1╙c'')/0'                                           °
  367.   '╕((3=ÉNC╞c)doif ''u╜⌡µÉ╜(╞c),'''' is already defined.'''''')/0'             °
  368.   '╕((3=µc)doif ''u╜simdd c'')/0' 'c╜(Γ''α∙ aw'')replace■c'                    °
  369.   'u╜ε''u╜'',((''a''εεc[2 3 4])/''a ''),(╞c),'' w;t;b'''                       °
  370.   'u╜u(5πc)(''b╜(t╜'',(3πc),'')/'',addquote ''u╜'',4πc)'                       °
  371. X 'u╜u,''╕(t doif b)/0''(''u╜'',2πc)' 'u╜╧ÉFX u'                               °
  372. *(1992 2 29 8 32 32 460)                                                       °
  373.  Fexit ÉFX 'exit w' 'Σ Exit if there are too many suspended functions'         °
  374. X '╕((10>µÉLC)doif ''w'')/0' '''Please re-enter '',w' '╕'                      °
  375. XCf 1 2  {                                                                     °
  376.  Afonts╜('GOTENG')('GOTGER')('GOTITA')('GRESER')('GRESIM')('MARKERS')('M       °
  377.  ODSIM')('ROMDUP')('ROMDUPF')('ROMITA')('ROMITAB')('ROMSER')('ROMSERB')(       °
  378.  'ROMSIM')('ROMSIMM')('SANSER')('SANSERF')('SCRIPT')('THKRNDF')('THKRNDO       °
  379. X')('THKSQUF')('THKSQUO')                                                      °
  380. XCfpath 1 17 D:\APL2OS2\FONTS\                                                 °
  381. XCg 1 2 }                                                                      °
  382. *(1996 3 12 15 27 53 504)                                                      °
  383.  Fget ÉFX 'u╜v get w;t;ÉPR' 'Σ Prompt for response from keyboard'              °
  384.   't╜(0=ÉNC ''v'')doif ''v╜1'' ╪ ÉPR╜''''' 'w╜w,(~²1╞v)/'': '''                °
  385.   'L0:æ╜w' 't╜æ' '╕((''╕''=(µw)╟t)doif ''╕'')/0' '╕(^/'' ''=w)/L1'             °
  386.   '╕((~w╧(µw)╞t)doif ''''''PLEASE DO NOT BACKSPACE'''''')/L0'                  °
  387.   't╜(µw)╟t' 'L1:u╜(²1+(,'' ''⌠t)∞1)╟t' '╕(1╞v)/0' 't╜(u⌠'' '')Γu'             °
  388. X 'u╜(µt),(Γu),t'                                                              °
  389. *(1996 8 4 13 59 47 588)                                                       °
  390.  Fgetfont ÉFX 'U╜getfont W;A;N;F' 'Σ retrieve fonts W'                         °
  391.   'U╜0 ╪ ╕(0<ÉNC ''af'')/L1 ╪ af╜,Γ''DEFAULT'''                                °
  392.   'L1:W╜,W ╪ W╜0,(Wε0,∞22)/W' 'L0:╕(0=µW╜1╟W)/0' '╕(0=A╜╞W)/L0'                °
  393.   'F╜εfpath,(N╜πfonts[A]),''.AVF'''                                            °
  394. X 'D207╜''FONTDEF''(N F) ╪ ╕(0⌠╞╞U╜D207)/0 ╪ af╜af,ΓN' '╕L0'                   °
  395. *(1996 3 10 15 8 33 340)                                                       °
  396.  Fglobals ÉFX 'globals;T;D207' 'Σ Initialize useful global variables'          °
  397.   'r╜2╙ÉTC' 'q╜40╙ÉAV' 's╜Φp╜'' '',d╜35╙ÉAV'                                   °
  398.   'sv╜(100 211 80 206)(210 124)' 'uc╜''ABCDEFGHIJKLMNOPQRSTUVWXYZ'''           °
  399.   'lc╜''abcdefghijklmnopqrstuvwxyz''' 'dig╜''1234567890'''                     °
  400.   'g╜Φ'' '',h╜126╙ÉAV' 'f╜ÉAV[33 124]' 'a╜38╙ÉAV' 'ul╜''²'''                   °
  401.   'T╜207 SVOFFER ''D207''' 'D207╜''QUERY'' ''''' 'modes╜,3πD207'               °
  402.   'path╜''D:\APL2OS2\WORK\''' 'Σ''The current path is '',path'                 °
  403.   'ΣT╜1 get ''Enter new path if incorrect, else press Enter: '''               °
  404.   'Σ╕((0<µT)doif ''path╜T'')/0' 'fpath╜''D:\APL2OS2\FONTS\'''                  °
  405.   '''For this lesson you must specify a path to the FONT files.'''             °
  406.   '''The current path is '',fpath'                                             °
  407.   'T╜1 get ''Enter new path if incorrect, else press Enter: '''                °
  408. X '╕((0<µT)doif ''fpath╜T'')/0'                                                °
  409. XCh 0 }                                                                        °
  410. *(1992 8 10 10 44 11 380)                                                      °
  411.  Findex ÉFX 'U╜V index W;A;C;H;I;T' 'Σ List contents of an AP 211 file'        °
  412.   'T╜~(1<╧W)doif ''H╜2πW'' ''W╜1πW''' 'T╜T doif ''H╜''''FUNCTION'''''''        °
  413.   'T╜(ΓW)ε''DOCS'' ''UTILITY'' ''HELP'' ''TUTOR'''                             °
  414.   'T╜T doif ''W╜path,W,''''.211''''''' '1 OPEN 211' 'D211╜''USE'' W'           °
  415.   '''File '',W,'' has record length='',1╟D211'                                 °
  416.   'D211╜''LIST'' ''NAMES''' 'U╜D211'                                           °
  417.   '╕((0=╧U)doif ''U╜''''Unknown file'''''')/0' 'C╜1╟µU╜U[I╜ÉAV√U;]'            °
  418.   '╕((0=ÉNC ''V'')doif ''CLOSE 211'')/0' 'U╜(C╞H),[1]ul,[1]U'                  °
  419.   '╕((0=1╞V)doif ''U╜0 0 2 tab U'' ''CLOSE 211'')/0'                           °
  420.   'D211╜''LIST'' ''ATTS''' 'A╜D211'                                            °
  421.   'A╜(''SZ'' ''ID'' ''DATE'' ''mo'' ''d'' ''TIME'' ''m'' ''s'' ''ms''),[       °
  422.  1]ul,[1]A[I;]' 'V╜(Vε0,(∞9),-∞9)/V' 'U╜U,«A[;(0⌠V)/|V]'                       °
  423.   '╕((0εV)doif ''CLOSE 211'')/0'                                               °
  424.   'T╜~(0<╛/V)doif ''U╜U[∞2;],[1](2 0╟U)[√(2 0╟A)[;|V];]'''                     °
  425.   'T╜T doif ''U╜U[∞2;],[1](2 0╟U)[ⁿ(2 0╟A)[;|V];]''' 'T╜ÉDL 1'                 °
  426. X 'CLOSE 211'                                                                  °
  427. *(1996 3 10 14 58 1 408)                                                       °
  428.  Finitialize ÉFX 'initialize;t;C2'                                             °
  429.   'Σ  Initialize workspace. (To add to "sv" keep 100 FIRST)' 'erase'           °
  430. X 'globals'                                                                    °
  431. *(1992 2 29 8 32 29 448)                                                       °
  432.  Fkeys ÉFX 'keys' 'Σ Display keyboard'                                         °
  433.   '''        1  2  3  4  5  6  7  8  9  0  +  ⌡'''                             °
  434.   '''SHFT ╒  ■  ²  <  ≤  =  ≥  >  ⌠  δ  ^  -  ÷'''                             °
  435.   '''ALT  ╘  ƒ  ·  ⁿ  √  Φ  φ  Θ  ╡  τ  σ  !  Æ''' ''''''                      °
  436.   '''         Q  W  E  R  T  Y  U  I  O  P  ╜  ╙  ╧'''                         °
  437.   '''SHFT     ?  ∙  ε  µ  ~  ╞  ╟  ∞  Ω  *  ╕  ╨  ╤'''                         °
  438.   '''ALT      q  w  e  r  t  y  u  i  o  p  æ  ≈  ╥'''                         °
  439.   '''CTRL     ┌  ┬  ┐              ╔  ╦  ╗''' ''''''                           °
  440.   '''          A  S  D  F  G  H  J  K  L  [  ]'''                              °
  441.   '''SHFT      α  ⌐  ╛  _  ╖  ╢  °  ''''  É  (  )'''                           °
  442.   '''ALT       a  s  d  f  g  h  j  k  l  »  «'''                              °
  443.   '''CTRL     ├  ┼  ┤       ─  ═    ╠  ╬  ╣''' ''''''                          °
  444.   '''           Z  X  C  V  B  N  M  ,  .  /'''                                °
  445.   '''SHFT       Γ  π  ∩  ¼  ¥  ÿ  |  ;  :  \'''                                °
  446.   '''ALT        z  x  c  v  b  n  m  Σ  ±  ≡'''                                °
  447.   '''CTRL      └  ┴  ┘  │  ║      ╚  ╩  ╝''' ''''''                            °
  448. X '''Toggle switch to ASCII is CTL-BACKSPACE''' '''CTRL+G gives beep'''        °
  449. *(1992 2 29 8 32 32 460)                                                       °
  450.  Flabel ÉFX 'u╜label w'                                                        °
  451.   'Σ Return 1 if w is not a valid character string label (also excludes        °
  452. Xl.c.)' '╕(u╜(1<µµw)δ1<╧w)/0' '╕(u╜~^/wεlc,uc,dig)/0' 'u╜w[1]εlc,dig'          °
  453. XClc 1 26 abcdefghijklmnopqrstuvwxyz                                           °
  454. XNmodes 1 10 1 800 600 65536 8 256 19 10 2826 2830                             °
  455. *(1992 2 29 8 32 33 464)                                                       °
  456.  Fnon ÉFX 'non;t;rc;et;r'                                                      °
  457.   'Σ Ignore invalid keyboard entries, but evaluate valid APL2 expression       °
  458.  s' 'æ╜''       ''' 't╜æ' '╕(0=µ(t⌠'' '')/t)/0' '(rc et r)╜ÉEC t'              °
  459. X '╕(0=rc)/2' '╕((1=rc)doif ''r'')/2' '╕2'                                     °
  460. *(1992 2 29 8 32 32 460)                                                       °
  461.  Fnotb ÉFX 'u╜notb w' 'Σ Remove trailing blanks'                               °
  462.   '╕((1<╧w)doif ''u╜notb■ w'')/0' '╕((1<µµw)doif ''u╜πnotb Γ[2]w'')/0'         °
  463. X 'u╜(1-(,'' ''⌠Φw)∞1)╟w'                                                      °
  464. *(1996 8 11 11 44 8 392)                                                       °
  465.  Fopen ÉFX 'U╜open W;T' 'Σ Activate AP 207' '╕(2=ÉSVO ''D207'')/U╜0'           °
  466.   'T╜ÉEX ''af''' 'T╜207 SVOFFER ''D207'''                                      °
  467. X 'D207╜''OPEN''(0 W 760 540 0 0)' '╕(0=╞╞U╜test)/0 ╪ ╕'                       °
  468. XCp 1 2  "                                                                     °
  469. XCpath 1 16 D:\APL2OS2\WORK\                                                   °
  470. XNpats 0 19                                                                    °
  471. *(1992 2 29 8 32 33 464)                                                       °
  472.  Fpause ÉFX 'v pause w;t'                                                      °
  473.   'Σ Pause, then print w v spaces right and return'                            °
  474. X 't╜(0=ÉNC ''v'')doif ''v╜6''' 'do' '(vµ'' ''),w' 'do'                        °
  475. *(1992 7 16 11 12 35 372)                                                      °
  476.  Fprint ÉFX 'print W;L;D80' 'Σ Print function W on an Epsom printer'           °
  477.   '╕((~(ÉNC W)ε3 4)doif ''''''This is not a function or defined operator       °
  478. X'''''')/0' 'OPEN 80' 'D80╜5' 'L╜,showfn W' 'D80╜π(L⌠r)ΓL' 'CLOSE 80'          °
  479. XCq 0 '                                                                        °
  480. XCr 0                                                                         °
  481. *(1992 2 29 8 32 32 460)                                                       °
  482.  Freplace ÉFX 'u╜v replace w;i;r;s' 'Σ  Replace elements in v in w'            °
  483.   'i╜Γ∞µu╜w' 's╜2πv╜(v⌠'' '')Γv' 'i╜⌡r╜i⌡■Γ[1]w°.=╞v'                          °
  484. X 'u[(εi)/εr]╜s[(εi)/εi⌡■∞µs]'                                                 °
  485. *(1992 2 29 8 32 38 484)                                                       °
  486.  Freset ÉFX 'reset' 'Σ Reset parameters to initial screen'                     °
  487.   'TEST ''G╜4 16 1 255 1 1 0 319 0 199 0 319 0 199 0 0 100 100 0 0 0 1 1       °
  488. X 1 0'''                                                                       °
  489. *(1992 2 29 8 32 33 464)                                                       °
  490.  Fround ÉFX 'u╜v round w' 'Σ Half adjust w to vth decimal'                     °
  491. X 'u╜(╛0.5+w⌡10*v)÷10*v'                                                       °
  492. XCs 1 2 "                                                                      °
  493. *(1992 8 10 10 58 49 588)                                                      °
  494.  Fshared ÉFX 'U╜shared;T;C2;D2;E2'                                             °
  495.   'Σ List all shared variables currently active'                               °
  496.   'T╜2 ÉSVO■''C2'' ''D2'' ''E2'''                                              °
  497.   '╕((δ/2⌠T╜ÉSVO■''C2'' ''D2'' ''E2'')doif ''''''AP 2 not active'''''')/       °
  498. X0' 'C2╜0' 'U╜D2[;4]' 'U╜((εsv)εU)/εsv'                                        °
  499. *(1992 2 29 8 32 33 464)                                                       °
  500.  Fshow ÉFX '╢v show ╢w;╢t;╢b' 'Σ Display and execute ╢w'                       °
  501.   '╢t╜(0=ÉNC ''╢v'')doif ''╢v╜0'''                                             °
  502.   '╕((0=╧╢w)doif ''show ╢w,'''' '''''')/0'                                     °
  503.   '╕((1<╧╢w)doif ''╢v show■ ╢w'')/0' '''      '',╢w'                           °
  504. X '╕((╢v^'':''ε╢w)doif ''╢t╜evaldd ╢w'')/L0' '''ÉEM'' ÉEA ╢w' 'L0:do'          °
  505. *(1992 2 29 8 32 33 464)                                                       °
  506.  Fshowdd ÉFX 'u╜showdd w;a;b;c;r'                                              °
  507.   'Σ  Display a direct definition function'                                    °
  508.   '╕((1=╧w)doif ''u╜showdd Γw'')/u╜0'                                          °
  509.   '╕((3⌠ÉNC╞w)doif ''(ε╞w),'''' is not a function'''''')/0'                    °
  510.   'c╜Γ[2]ÉCR╞w' 'c╜notb(2╞c),(Γ''aw α∙'')replace■2╟c'                          °
  511.   '╕((~''ΣDD''╧3╞2πc)doif ''''''Not a direct definition function'''''')/       °
  512.  0' 'u╜1' 'b╜('' ''⌠╞c)Γ╞c' 'a╜''      ''' 'r╜2╟3πc'                           °
  513.   '╕((3=µc)doif ''a,(╞w),'''':'''',r,(3<µ2πc)/''''   Σ'''',3╟2πc'')/0'         °
  514.   'a╜a,(╞w),'':'',(2╟5πc),'':''' 'b╜(+\r=''('')-+\r='')''' 'b╜b∞0'             °
  515. X 'a╜a,(²3╟(b-1)╞3╟r),'':'',2╟»(b+2)╟r' 'a,(3<µ2πc)/''  Σ'',3╟2πc'             °
  516. *(1992 9 6 10 33 13 332)                                                       °
  517.  Fshowfn ÉFX 'u╜v showfn w;f;n;t;ÉIO' 'Σ Simulate the STSC ÉVR command'        °
  518.   't╜(0=ÉNC ''v'')doif ''v╜,0''' 'ÉIO╜0'                                       °
  519.   'u╜''      '',''╖'',w,''[É]'',(╞v)╞''╖''' 'n╜1╞µf╜ÉCR w'                     °
  520.   'v╜v[0],((1╟v)ε∞n)/1╟v' 'n╜«∞n' 'n╜(n⌠'' '')Γn'                              °
  521.   'f╜(π''['',■n,■Γ''] ''),f'                                                   °
  522.   't╜(1<µ,v)doif ''f╜f[1╟v;]'' ''u╜''''''''''' 'u╜²1╟u,r,,f,r'                 °
  523. X 'u╜((-+/^\'' ''=Φu)╟u),('' ''(r,''      ╖'',date 2 ÉAT w))[╞v]'              °
  524. *(1992 9 13 10 41 2 348)                                                       °
  525.  Fshowg ÉFX 'v╢ showg ╢w;╢t;╢b' 'Σ Display and execute ╢w'                     °
  526.   '╢t╜(0=ÉNC ''╢v'')doif ''╢v╜0'''                                             °
  527.   '╕((0=╧╢w)doif ''╢v showg ╢w,'''' '''''')/0'                                 °
  528.   '╕((1<╧╢w)doif ''╢v showg■ ╢w'')/0' '''      '',╢w'                          °
  529. X 't╢╜v╢ doif ''do''' '''ÉEM'' ÉEA ╢w' '╢w,r'                                  °
  530. *(1992 2 29 8 32 33 464)                                                       °
  531.  Fsimdd ÉFX 'u╜simdd w;e' 'Σ Simple direct definition mode' 'u╜0'              °
  532.   '╕((0⌠ÉNC╞w)doif ''''''Already defined'''''')/0' 'e╜''α''ε2πw'               °
  533.   'w[2]╜Γ''u╜'',''α∙ aw'' replace 2πw' 'w╜w[1 3 2]'                            °
  534. X 'w[1]╜Γε''u╜'',(e/''a ''),w[1],'' w''' 'u╜╧ÉFX w'                            °
  535. XAsv╜(100 211 80 206)(210 124)                                                 °
  536. XCt 1 7                                                                        °
  537. *(1992 6 3 9 59 17 424)                                                        °
  538.  Ftab ÉFX 'U╜V tab W;T;A;B;C;D;E;F;G;M;ÉPW' 'Σ Tabulate list W'                °
  539.   'T╜(0=ÉNC ''V'')doif ''V╜0''' 'M╜''Invalid data for tabulation'''            °
  540.   'V╜4╞V' 'ÉPW╜130╛30⌐G╜V[2]+79⌡V[2]=0'                                        °
  541.   'L1:╕((1<╧W)doif ''''''W╜∞0'''' ÉEA ''''W╜πW'''''')/L1'                      °
  542.   '╕(((0=µεW)δ2<µµW)doif ''U╜(~V╧4╞0)/M'')/0'                                  °
  543.   'T╜(1≥µµU╜«W)doif ''U╜πW╜(U⌠'''' '''')ΓU'''                                  °
  544.   'T╜(0<V[1])doif ''U╜(«(Φ1,╞µW)µ(V[3]µ'''' ''''),∞(╞µW)-V[3]),'''' ''''       °
  545.  ,U''' '╕(G<30)/0' 'T╜(F╜µεV[4])+C╜1╟B╜µA╜(V[3],0)╟U'                          °
  546.   'T╜⌐(1╞B)÷1⌐╛(ÉPW+F)÷T' 'U╜(E╜(V[3],C)╞U),[1](B╜T,1╟B)╞A'                    °
  547.   '''D╜εV[4]'' ÉEA ''D╜ÉAV[εV[4]+33⌡V[4]=0]''' 'L0:A╜(T,0)╟A'                  °
  548. X '╕(0=1╞µA)/0' 'U╜U,(((T+V[3]),µD)µD),E,[1]B╞A' '╕L0'                         °
  549. *(1996 7 19 13 48 24 508)                                                      °
  550.  Ftest ÉFX 'U╜test' 'Σ test return code' '╕(0=╞╞U╜D207)/0'                     °
  551. X '''SESSION ABORTED: The return code is '',╞U ╪ DISPLAYπU ╪ ╕'                °
  552. *(1992 9 5 9 10 34 316)                                                        °
  553.  Ftestap ÉFX 'U╜testap W;B;D;S;T'                                              °
  554.   'Σ Test for existence of specific AP"s' 'D╜''D'',■«■W╜,W'                    °
  555.   'T╜W ÉSVO■D' 'U╜0' '╕((^/B╜2=ÉSVO■D)doif ''T╜ÉEX■ D'')/0'                    °
  556.   'T╜''The following Auxilliary Processor'',(S╜1<+/~B)╞''s'''                  °
  557.   'T,(ε(S+1)╙'' is'' '' are''),'' not available'',(~B)/W' 'U╜1'                °
  558. X 'T╜ÉEX■D'                                                                    °
  559. XCuc 1 26 ABCDEFGHIJKLMNOPQRSTUVWXYZ                                           °
  560. XCul 0 ²                                                                       °
  561. *(1996 9 13 13 15 4 280)                                                       °
  562.  Fwarna ÉFX 'warna;T' 'Σ clear AP207 and explai' 'T╜ÉSVR ''D207'''             °
  563. X 'T╜ÉEX ''D207'''                                                             °
  564. *(1996 9 13 13 15 21 348)                                                      °
  565.  Fwarnb ÉFX 'warnb;T' 'Σ clear AP207 and explain'                              °
  566.   '''WARNING: As you study this lesson, try to respond to all requests.'       °
  567.  ',r'                                                                          °
  568.   '''Of course as in all these tutorials, you are encouraged to experime       °
  569.  nt'''                                                                         °
  570.   '''at any pause. When an AP 207 command is issued, there may be an int       °
  571.  erval'''                                                                      °
  572.   '''of a second or two of no action, followed by a flash on the screen.       °
  573.  '''                                                                           °
  574.   '''If the graphic screen does not appear you may invoke the Ctrl-Esc''       °
  575. X' '''command to display any current AP 207 window.''' 'do'                    °
  576. *(1996 9 13 13 15 29 380)                                                      °
  577.  Fwarning ÉFX 'warning;T' 'Σ clear AP207 and explain' 'warna' 'warnb'          °
  578.   '''As in the previous lesson the function "test" is used to verify'''        °
  579.   '''that a command given to AP207 was successful. The function returns'       °
  580.  ''                                                                            °
  581.   '''a nested vector. The first element of this vector may be nested.'''       °
  582.   '''The take (╞) of this element contains the Return Code.'',r'               °
  583.   '''WARNING! Do not issue a TEST command while there is a graphic'''          °
  584.   '''window in the window list.'',r'                                           °
  585.   '''(You may also wish to view function "test" at this point.)'''             °
  586. X 'end'                                                                        °
  587.