home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / teachapl.zip / teach49.zip / TEACH49.ATF
Text File  |  1996-08-12  |  54KB  |  660 lines

  1. XNÉIO 0 1                                                                      °
  2. XNÉCT 0 1.000000000000011E²13                                                  °
  3. XCÉFC 1 6 .,*0_²                                                               °
  4. XNÉRL 0 1227464303                                                             °
  5. XCÉPR 0                                                                        °
  6. XCÉLX 1 5 TEACH                                                                °
  7. *(1992 2 29 8 32 29 448)                                                       °
  8.  FDISPLAY ÉFX 'D╜S DISPLAY A;ÉIO;R;C;HL;HC;HT;HB;VL;VB;V;W;N;B'                °
  9.   'Σ DISPLAY A GENERAL ARRAY IN PICTORIAL FORM'                                °
  10.   'Σ  NORMAL CALL IS MONADIC.  DYADIC CALL USED ONLY IN'                       °
  11.   'Σ    RECURSION TO SPECIFY DISPLAY RANK, SHAPE, AND DEPTH.' 'ÉIO╜0'          °
  12.   '»(0=ÉNC ''S'')/''S╜µA''' 'R╜╞µ,S                   Σ PSEUDO RANK.'          °
  13.   'C╜''┐┌└┘''                 Σ UR, UL, LL, AND LR CORNERS.'                   °
  14.   'HL╜''─''                   Σ HORIZONTAL LINE.'                              °
  15.   'HC╜HL,''Θ╕'',HL,''~+ε''      Σ HORIZONTAL BORDERS.'                         °
  16.   'HT╜HC[(0<R)⌡1+0<╞²1╞,S]' 'ΣW╜,0╧■╞0µΓ(1⌐µA)╞A'                              °
  17.   'HB╜HC[3+3╛(''2⌡~A╧«A'' ÉEA ''1+╞ε0⌡(1⌐⌡/µA)╞,A'')+3⌡1<µµS]'                 °
  18.   'VL╜''│''                   Σ VERTICAL LINE.'                                °
  19.   'VB╜VL,''Φ╟''               Σ VERTICAL BORDER.'                              °
  20.   'V╜VB[(1<R)⌡1+0<²1╞²1╟,S]'                                                   °
  21.   '»(0εµA)/''A╜(1⌐µA)µΓ╞A''   Σ SHOW PROTOTYPE OF EMPTIES.'                    °
  22.   '╕(1<╧A)/GEN' '╕(2<µµA)/D3'                                                  °
  23.   'D╜«A                     Σ SIMPLE ARRAYS.' 'W╜1╞µD╜(²2╞1 1,µD)µD'           °
  24.   'N╜²1+1╟µD' '╕(0=µµA)/SS'                                                    °
  25.   'D╜(C[1],V,((W-1)µVL),C[2]),((HT,NµHL),[0]D,[0]HB,NµHL),C[0],(WµVL),C[       °
  26.  3]' '╕0' 'SS:HB╜((0 '' '')=╞0µΓA)/'' -'''                                     °
  27.   'D╜'' '',('' '',[0]D,[0]HB,Nµ'' ''),'' ''' '╕0'                              °
  28.   'GEN:D╜«DISPLAY■A          Σ ENCLOSED ...' 'N╜Dδ.⌠'' '''                     °
  29.   'D╜(Nδ~1ΦN)≡D' 'D╜(δ≡~''  ''╤D)/D' 'D╜((1,µS)µS)DISPLAY D'                   °
  30.   '╕(2≥µ,S)╟D3E,0' 'D3:D╜0 ²1╟0 1╟«ΓA         Σ MULT-DIMENSIONAL ...'          °
  31.   'W╜1╞µD' 'N╜²1+1╟µD'                                                         °
  32.   'D╜(C[1],V,((W-1)µVL),C[2]),((HT,NµHL),[0]D,[0]HB,NµHL),C[0],(WµVL),C[       °
  33.  3]' 'D3E:N╜²2+µ,S'                                                            °
  34. X 'V╜C[Nµ1],[0]VB[1+0<²2╟,S],[0](((²3+╞µD),N)µVL),[0]C[Nµ2]' 'D╜V,D'           °
  35. *(1992 8 14 10 7 40 364)                                                       °
  36.  FDOS ÉFX 'DOS W;T;D100;D2' 'Σ Simulation of DOS prompt'                       °
  37.   'T╜100 ÉSVO ''D100'''                                                        °
  38.   'T╜(2⌠ÉSVO ''D100'')doif ''''''AP100.COM'''' opentwo 1'' ''T╜100 ÉSVO        °
  39.  ''''D100''''''' '╕((0<µ(W⌠'' '')/W)doif ''D100╜W'')/0' 'L0:æ╜''C:>'''         °
  40. X '╕(^/'' ''=T╜3╟æ)/0' 'D100╜T' '╕L0'                                          °
  41. *(1996 8 5 12 41 11 372)                                                       °
  42.  FFONTS ÉFX 'FONTS W;H;T;D207' 'Σ Test fonts' 'T╜open' 'T╜getfont W'           °
  43.   'L0:H╜(1+╞W)π(Γ''DEFAULT''),fonts'                                           °
  44.   'D207╜''FONT''(0 0)''MOVE''(100 450)''WRITE''(''This is font '',H)'          °
  45.   'D207╜''FONT''(H 16)''MOVE''(100 400)''WRITE'' ÉAV[∞32]'                     °
  46.   'D207╜''FONT''(H 16)''MOVE''(100 350)''WRITE'' ÉAV[32+∞32]'                  °
  47.   'D207╜''FONT''(H 16)''MOVE''(100 300)''WRITE'' ÉAV[64+∞32]'                  °
  48.   'D207╜''FONT''(H 16)''MOVE''(100 250)''WRITE'' ÉAV[96+∞32]'                  °
  49.   'D207╜''FONT''(H 16)''MOVE''(100 200)''WRITE'' ÉAV[128+∞32]'                 °
  50.   'D207╜''FONT''(H 16)''MOVE''(100 150)''WRITE'' ÉAV[160+∞32]'                 °
  51.   'D207╜''FONT''(H 16)''MOVE''(100 100)''WRITE'' ÉAV[192+∞32]'                 °
  52.   'D207╜''FONT''(H 16)''MOVE''(100 50)''WRITE'' ÉAV[224+∞32]'                  °
  53.   'D207╜''view'' '''' ''wait'' ''''' 'D207╜''CLEAR'' ''''' 'W╜1╟W'             °
  54. X '╕(0<µW)/L0'                                                                 °
  55. *(1992 2 29 8 32 30 452)                                                       °
  56.  FGO ÉFX 'GO;b;e;t' 'Σ Expression driver' 'L0:b╜e╜''''' 'æ╜''       '''        °
  57.   't╜æ' '╕(^/'' ''=t)/L0' '╕((^/'')OFF ''=5╞6╟t)doif ''exit'')/0'              °
  58.   '╕(('':''εt)doif ''b╜evaldd (+/^\'''' ''''=t)╟t'')/L0'                       °
  59.   '''e╜ÉEM'' ÉEA t' '╕(0=µ,e)/L0' '╕b/L0'                                      °
  60.   '''This is not a valid APL2 expression''' 'æ╜''*'''                          °
  61. X '╕(''?''⌠╞1╟æ)/L0' 'e' '╕L0'                                                 °
  62. *(1995 4 23 14 14 6 304)                                                       °
  63.  FSVOFFER ÉFX 'DC╜PID SVOFFER SV' 'SV╜(²2╞1 1,µSV)µSV╜πSV'                     °
  64.   '╕(2=ÉNC ''PID'')/DYADIC' 'DC╜ÉSVO SV ╪ ╕0'                                  °
  65.   'DYADIC:╕(1^.⌠DC╜PID ÉSVO SV)/END' 'ÉSVE╜15'                                 °
  66.   'CHECK:╕(1^.⌠DC╜ÉSVO SV)/END' '╕(0⌠ÉSVE)/CHECK'                              °
  67. X 'END:SV╜1 0 1 0 ÉSVC SV'                                                     °
  68. *(1993 8 29 23 0 0 292)                                                        °
  69.  FSVOPAIR ÉFX '≈_DC╜≈_PID SVOPAIR ≈_SV;≈_CV'                                   °
  70.   'Σ------------------------------------------------------------------Σ'       °
  71.   'Σ' 'Σ  Offer shared variables named in SV to processor number PID.'         °
  72.   'Σ  To be used for auxiliary processors which use a two-variable'            °
  73.   'Σ  interface, where the control variable begins with "C" or "CTL"'          °
  74.   'Σ  and the data variable begins with "D" or "DAT".  (Cxxx/Dxxx or'          °
  75.   'Σ  CTLxxx/DATxxx)' 'Σ'                                                      °
  76.   'Σ  Returns final degree of coupling (DC) for each shared variable'          °
  77.   'Σ  Expected degree of coupling is 2 for the control variable and 1'         °
  78.   'Σ  or 2 for the data variable.' 'Σ'                                         °
  79.   'Σ  Waits up to 15 seconds for the control variable to be accepted'          °
  80.   'Σ  by the processor.  Sets standard access control to inhibit my'           °
  81.   'Σ  double references or specifications of the control variable.'            °
  82.   'Σ  Does not set access control for the data variable.' 'Σ'                  °
  83.   'Σ  Monadic call simply returns the current degree of coupling.' 'Σ'         °
  84.   'Σ------------------------------------------------------------------Σ'       °
  85.   'Σ' 'Σ Examples:' 'Σ'                                                        °
  86.   'Σ Offer a set of variables to the fullscreen processor'                     °
  87.   'Σ       124 SVOPAIR ''CTL124'' ''DAT124''' 'Σ 2 1' 'Σ'                      °
  88.   'Σ Offer using surrogates'                                                   °
  89.   'Σ       124 SVOPAIR ''Control C'' ''Data D''' 'Σ 2 1' 'Σ'                   °
  90.   'Σ Note: Access control set for control, not data'                           °
  91.   'Σ       ÉSVC■ ''Control'' ''Data''' 'Σ  1 0 1 1  0 0 0 0' 'Σ'               °
  92.   'Σ Check degree of coupling' 'Σ       SVOPAIR ''Control'' ''Data'''          °
  93.   'Σ 2 1' 'Σ' 'Σ Offer improper control variable'                              °
  94.   'Σ       210 SVOPAIR ''A1'' ''D1''' 'Σ 1 1' 'Σ'                              °
  95.   'Σ===================================================================Σ       °
  96.  ' 'Σ'                                                                         °
  97.   '≈_SV╜(²2╞1 1,µ≈_SV)µ≈_SV╜π≈_SV      Σ Convert name argument to matrix       °
  98.  '                                                                             °
  99.   '╕(2=ÉNC ''≈_PID'')/≈_DYADIC           Σ Is it a dyadic function call?       °
  100.  '                                                                             °
  101.   '≈_DC╜ÉSVO ≈_SV                      Σ Just return coupling if monadic       °
  102.  ' '╕0                                  Σ and exit' '≈_DYADIC:'                °
  103.   '≈_CV╜(-+/^\Φ≈_SV='' '')Φ≈_SV          Σ Rotate trailing blanks and th       °
  104.  en'                                                                           °
  105.   '≈_CV╜(-+/^\Φ≈_CV⌠'' '')Φ≈_CV          Σ rotate surrogate name to fron       °
  106.  t'                                                                            °
  107.   '≈_CV╜≈_CV[;ÉIO]=''C''                 Σ Which names are control vars?       °
  108.  ' '╕(1^.⌠≈_CV/≈_DC╜≈_PID ÉSVO ≈_SV)/≈_END   Σ Initial Offer'                  °
  109.   'ÉSVE╜15                             Σ Wait up to 15 seconds for accep       °
  110.  ts' '≈_CHECK:' '╕(1^.⌠≈_CV/≈_DC╜ÉSVO ≈_SV)/≈_END    Σ Check couplings'        °
  111.   '╕(0⌠ÉSVE)/≈_CHECK                   Σ Retry if time left' '≈_END:'          °
  112.   '≈_CV╜1 0 1 0 ÉSVC ≈_CV≡≈_SV         Σ Set access control on C vars on       °
  113. Xly'                                                                           °
  114. *(1996 8 7 13 13 55 448)                                                       °
  115.  FTEACH ÉFX 'TEACH' 'Σ Copyright Z V Jizba 1991; all rights reserved'          °
  116.   'copyright' 'initialize' 'warning' 'do'                                      °
  117.   'TEACH1  Σ Using more than one font at a time'                               °
  118.   'TEACH2  Σ Contents of image and vector fonts'                               °
  119.   'TEACH3  Σ The MARKERS font'                                                 °
  120.   'TEACH4  Σ Font contents and characteristics'                                °
  121.   'TEACH5  Σ Special symbols' 'TEACH6  Σ The command QWRITE'                   °
  122.   'TEACH7  Σ Using line types in vector fonts'                                 °
  123. X 'TEACH8  Σ Sample vector font file'                                          °
  124. *(1996 8 4 13 4 3 192)                                                         °
  125.  FTEACH1 ÉFX 'TEACH1;T;D207' 'Σ Using more than one font'                      °
  126.   '''USING MORE THAN ONE FONT AT A TIME'',r'                                   °
  127.   '''In all the previous examples we have used only one font at a time.'       °
  128.  ''                                                                            °
  129.   '''In many applications it is often desirable to use more than one fon       °
  130.  t.'''                                                                         °
  131.   '''Once a font has been brought into the active graphic mode, it stays       °
  132.  '''                                                                           °
  133.   '''until the screen mode is retracted, or until the font has been remo       °
  134.  ved.''' 'do'                                                                  °
  135.   '''I have failed so far in my attempts to use command FONTDEF with a n       °
  136.  ull'''                                                                        °
  137.   '''right argument, as well as with a ²1 right argument. To get around'       °
  138.  ''                                                                            °
  139.   '''this problem, there are four utility functions that support the'''        °
  140.   '''functions of these two FONTDEF commands. These utilities are listed       °
  141.  ''' '''below''' 'do'                                                          °
  142.   '''Function "open" makes AP 207 active. In doing so it expunges "af"''       °
  143.  ,r' 'showfn ''open''' 'do'                                                    °
  144.   '''Function "getfont" retrieves one or more fonts. The right argument        °
  145.  is'''                                                                         °
  146.   '''the font number. This function also stores the active font names in       °
  147.  ''' '''the global variable "af"'',r' 'showfn ''getfont''' 'do'                °
  148.   '''Function "infonts" generates a table of fonts currently in the work       °
  149.  space.'',r' 'showfn ''infonts''' 'do'                                         °
  150.   '''Function "dropfont" will remove named font from the workspace. The'       °
  151.  ''                                                                            °
  152.   '''right argument to this function is a nested list of font names'',r'       °
  153.   'showfn ''dropfont''' 'do'                                                   °
  154.   '''We will call on utility function "getfont" and attempt to bring int       °
  155.  o''' '''active graphic mode all of the vector fonts'',r'                      °
  156.   'show ''T╜open ╪ T╜getfont 0,∞22'''                                          °
  157.   '''All 22 IBM fonts should be now available. Using function "infonts"'       °
  158.  '' '''we can list all active fonts''' 'do' 'show ''DISPLAY πinfonts'''        °
  159.   '''We verify that font GOTENG is currently active'',r'                       °
  160.   'show ''D207╜''''move'''' (200 200) ''''font'''' (''''GOTENG'''' 20)''       °
  161.  ' 'show ''D207╜''''write'''' ''''GOTENG'''' ''''view'''' '''''''''''          °
  162.   '''Next we will remove this font'',r'                                        °
  163.   'show ''T╜dropfont ''''GOTENG'''''''                                         °
  164.   '''And now we will attempt to write text using this font'',r'                °
  165.   'show ''D207╜''''font'''' (''''GOTENG'''' 20) ╪ DISPLAY D207'''              °
  166.   '''The return code 61 tells us that font GOTENG is no longer active.''       °
  167. X' 'end'                                                                       °
  168. *(1996 8 6 12 21 30 372)                                                       °
  169.  FTEACH2 ÉFX 'TEACH2' 'Σ Contents of image font'                               °
  170.   '''Although there are 22 vector fonts, not all of these have an image'       °
  171.  ''                                                                            °
  172.   '''for all 256 characters. Function FONTS has been defined to study'''       °
  173.   '''the contents of any and all image fonts.''' 'do'                          °
  174.   '''The right argument to FONTS is a list of integers specifying the'''       °
  175.   '''fonts to be displayed. A zero right argument will display the'''          °
  176.   '''graphics for the image (default) font. (To exit graph, press any ke       °
  177.  y)''' 'do' 'show ''FONTS 0'''                                                 °
  178.   '''The function displays 8 rows of text, each row with 32 characters''       °
  179.  '                                                                             °
  180.   '''for a total of 256 symbols. There are several positions that remain       °
  181.  '''                                                                           °
  182.   '''blank. The first column of rows 1 and 2 are blank (ÉAV[33] is the''       °
  183.  ' '''blank), and the last column of the last row is also a blank.'',r'        °
  184.   '''We now will display the 22 image fonts. (PRESS ANY KEY TO VIEW THE'       °
  185. X'' '''NEXT FONT)''' 'do' 'show ''FONTS ∞22''' 'end'                           °
  186. *(1996 8 12 13 59 21 516)                                                      °
  187.  FTEACH3 ÉFX 'TEACH3;T;D207' 'Σ Contents of MARKERS font'                      °
  188.   '''Let us now take a look at the contents of some of the vector fonts.       °
  189.  ''' '''We begin with the MARKERS font (#6)''' 'do' 'show ''FONTS 6'''         °
  190.   '''This font has only 29 graphics: 19 markers and the 10 digits.'',r'        °
  191.   '''Even though the second line of the MARKERS font makes it look like'       °
  192.  ''                                                                            °
  193.   '''the digits are misplaced (in ÉAV[33-42] instead of ÉAV[49-58]), the       °
  194.  y'''                                                                          °
  195.   '''are accessible in the normal way. To show this we will get into the       °
  196.  ''' '''graphic mode, invoke font MARKERS, and display the digits'''           °
  197.   'do' 'show ''T╜open ╪ T╜getfont 6'''                                         °
  198.   'show ''D207╜''''FONT'''' (''''MARKERS'''' 40) ''''MOVE'''' (100 100)'       °
  199.  ''                                                                            °
  200.   'show ''D207╜''''WRITE'''' ''''0123456789'''' ''''marker'''' (200 200)       °
  201.   ''''view'''' '''''''''''                                                     °
  202.   '''Note that even though MARKER is active, and its height has been set       °
  203.  '''                                                                           °
  204.   '''to 40 pels, the command MARKER ignores this height. The marker is''       °
  205. X' '''posted at its "default" size.''' 'end'                                   °
  206. *(1996 8 12 14 0 13 252)                                                       °
  207.  FTEACH4 ÉFX 'TEACH4' 'Σ Contents of vector fonts'                             °
  208.   '''We have seen that the image font has graphics for all but three of'       °
  209.  ''                                                                            °
  210.   '''the 256 components of the atomic vector. We have also seen that the       °
  211.  '''                                                                           °
  212.   '''MARKERS font contains a very restricted number of graphics. What'''       °
  213.   '''about the other fonts. Let us first compare the image font with the       °
  214.  ''' '''"Thick square filled" font THKSQUF'',r'                                °
  215.   '''As you watch the fonts being drawn look for these:'''                     °
  216.   '''1 The time it takes to draw the image and vector fonts'''                 °
  217.   '''2 Observe the width of individual characters'''                           °
  218.   '''3 Note how many characters are represented by a font''' 'do'              °
  219.   'show ''FONTS 0 21''' '''Three things are immediately apparent:'',r'         °
  220.   '''1. It takes a much longer time to draw the vector font THKSQUF'''         °
  221.   '''2. The width of individual characters varies significantly'''             °
  222.   '''3. Not all of the 256 positions of vector font have an image.'''          °
  223.   'do'                                                                         °
  224.   '''The speed of a vector font will depend on the complexity of the'''        °
  225.   '''images to be represented. We can compare the speed of two vector'''       °
  226.   '''fonts. GOTGER like GOTENG has elaborate designs for the upper case'       °
  227.  ''                                                                            °
  228.   '''letters of the alphabet. MODSIM is simple and contains few strokes.       °
  229.  ''' 'do' 'show ''FONTS 2 7'''                                                 °
  230.   '''Since font MODSIM requires fewer strokes, it completes its task'''        °
  231. X '''much faster.''' 'end'                                                     °
  232. *(1996 8 6 12 48 51 564)                                                       °
  233.  FTEACH5 ÉFX 'TEACH5;T;R;RM;A;D207' 'Σ Special symbols'                        °
  234.   '''Some fonts support characters that may be used in special applicati       °
  235.  ons.'''                                                                       °
  236.   '''Consider for example fonts GRESER and GRESIM. These fonts contain''       °
  237.  ' '''symbols useful in mathematical notation'',r'                             °
  238.   '''Font GRESER includes the integration symbols (including the line'''       °
  239.   '''integral), while font GRESIM contains the symbols for infinity,'''        °
  240.   '''and proportionality.''' 'do' 'show ''FONTS 4 5'''                         °
  241.   '''Fonts 14 (ROMSIM) and 15 (ROMSIMM) are the only vector fonts that''       °
  242.  '                                                                             °
  243.   '''support the APL2 characters. ROMSIM characters have a variable widt       °
  244.  h'''                                                                          °
  245.   '''while ROMSIMM characters are all of equal width. To show this, we''       °
  246.  '                                                                             °
  247.   '''will invoke AP207 and display the alphabet for these two fonts. Not       °
  248.  e'''                                                                          °
  249.   '''the extra space around the letters I and J on the ROMSIMM line.'',r       °
  250.  '                                                                             °
  251.   'show ''T╜open ╪ T╜getfont 14 15 ╪ R╜''''ROMSIM'''' ╪ RM╜''''ROMSIMM''       °
  252.  ''''' 'show ''A╜'''': ABCDEFGHIJKLMNOPQRSTUVWXYZ'''''''                       °
  253.   'show ''D207╜''''move'''' (50 200) ''''font'''' (R 20) ''''write'''' (       °
  254.  R,A)'''                                                                       °
  255.   'show ''D207╜''''move'''' (50 400) ''''font'''' (RM 20) ''''write''''        °
  256.  (RM,A)''' 'D207╜''view'' '''''                                                °
  257.   '''Fonts ROMSIM and ROMSIMM also contain a variety of special symbols'       °
  258.  '' '''that may be useful in game playing applications. They also'''           °
  259.   '''include accented letters that are commonly used in certain European       °
  260.  '''                                                                           °
  261.   '''languages. Note too the special symbols to create frames and fill''       °
  262. X' '''patterns''' 'do' 'show ''FONTS 14 15''' 'end'                            °
  263. *(1996 8 5 13 45 20 428)                                                       °
  264.  FTEACH6 ÉFX 'TEACH6;T;D207' 'Σ Command QWRITE'                                °
  265.   '''THE COMMAND QWRITE'',r'                                                   °
  266.   '''With the great variety of fonts, it may be necessary at times to'''       °
  267.   '''calculate the position of the text box before writing the text.'',r       °
  268.  '                                                                             °
  269.   '''For example, consider writing a large display of the integral sign'       °
  270.  '' '''in font GRESER'' r' 'do' 'show ''T╜open ╪ T╜getfont 3 4 19'''           °
  271.   'show ''D207╜''''FONT'''' (''''GRESER'''' 90) ''''MOVE'''' (90 90) '''       °
  272.  'WRITE'''' ÉAV[230]'''                                                        °
  273.   'show ''T╜test ╪ D207╜''''view'''' '''''''' ╪ DISPLAY 4 2µ4 2πT'''           °
  274.   '''One might want to verify that the superscripts, subscripts and the'       °
  275.  ''                                                                            °
  276.   '''equation to be written all fit the screen. Command QWRITE works jus       °
  277.  t'''                                                                          °
  278.   '''like command WRITE, except that it does not produce an image on the       °
  279.  '''                                                                           °
  280.   '''screen. In the next example we will issue the command QWRITE to "wr       °
  281.  ite"'''                                                                       °
  282.   '''the same symbol at location 90 290 (above the first one)'',r'             °
  283.   'show ''D207╜''''FONT'''' (''''GRESER'''' 90) ''''MOVE'''' (90 290) ''       °
  284.  ''QWRITE'''' ÉAV[230]'''                                                      °
  285.   'show ''T╜test ╪ D207╜''''view'''' '''''''' ╪ DISPLAY 4 2µ4 2πT'''           °
  286.   '''Although no text is visible, the returned vector gives the paramete       °
  287.  rs''' '''of the box.''' 'do' '''THE ANATOMY OF VECTOR FONTS'',r'              °
  288.   '''When a symbol is drawn very large we can observe the individual lin       °
  289.  es'''                                                                         °
  290.   '''that produce the desired shapes. Compare the following two drawings       °
  291.   of''' '''the letter "A"'',r' 'do' 'D207╜''CLEAR'' '''''                      °
  292.   'show ''D207╜''''FONT'''' (''''GOTITA'''' 90) ''''MOVE'''' (100 90) ''       °
  293.  ''WRITE'''' ''''A'''''''                                                      °
  294.   'show ''D207╜''''FONT'''' (''''THKRNDF'''' 90) ''''MOVE'''' (200 90) '       °
  295.  '''WRITE'''' ''''A''''''' 'D207╜''view'' ''''' 'do'                           °
  296.   '''Under font GOTITA, the letter A is made up of a number of straight        °
  297.  line'''                                                                       °
  298.   '''segments. With font THKRNDF, however, the font fills the space with       °
  299.  ''' '''the foreground color (black in this case).'',r'                        °
  300.   '''We already know how to draw straight line segments. We will learn''       °
  301. X' '''how to fill space with color in the next lesson.'',r' 'end'              °
  302. *(1996 8 7 13 19 25 352)                                                       °
  303.  FTEACH7 ÉFX 'TEACH7;T;D207' 'Σ LINETYPE;T;D207'                               °
  304.   '''Finally, before leaving this lesson, it should be pointed out that'       °
  305.  ''                                                                            °
  306.   '''the LINETYPE command can be used with those fonts that are made up'       °
  307.  '' '''of straight line segments'',r' 'do'                                     °
  308.   'show ''T╜open ╪ T╜getfont 3 19 20'''                                        °
  309.   'show ''D207╜''''LINETYPE'''' (1 1) ''''CLEAR'''' '''''''''''                °
  310.   '''Setting the line type to show dotted lines, we first look at font''       °
  311.  ' '''GOTITA''' 'do'                                                           °
  312.   'show ''D207╜''''FONT'''' (''''GOTITA'''' 90) ''''MOVE'''' (200 90) ''       °
  313.  ''WRITE'''' ''''A''''''' 'D207╜''view'' ''''' 'do'                            °
  314.   '''The line type will have no effect on a font such as THKRNDF, becaus       °
  315.  e'''                                                                          °
  316.   '''the enclosed outline of each letter is filled out with the foregrou       °
  317.  nd''' '''color''' 'do'                                                        °
  318.   'show ''D207╜''''FONT''''(''''THKRNDF'''' 90)''''MOVE''''(300 90)''''W       °
  319.  RITE'''' ''''A''''''' 'D207╜''view'' ''''' 'do'                               °
  320.   '''However, the version of this font without the FILL option (THKRNDO)       °
  321.  ''' '''can be drawn in the dotted line type.'',r'                             °
  322.   'show ''D207╜''''LINETYPE'''' (1 2)'''                                       °
  323.   'show ''D207╜''''FONT''''(''''THKRNDO'''' 90)''''MOVE''''(400 90)''''W       °
  324. XRITE'''' ''''A''''''' 'D207╜''view'' ''''' 'end'                              °
  325. *(1996 8 8 13 22 31 392)                                                       °
  326.  FTEACH8 ÉFX 'TEACH8;T;D207' 'Σ Sample vector font file'                       °
  327.   '''SAMPLE VECTOR FONT FILE'',r'                                              °
  328.   '''Pages 209-210 of the User''''s Manual describe the format of vector       °
  329.  '''                                                                           °
  330.   '''font files. Function "readfont" was designed to provide access to''       °
  331.  '                                                                             °
  332.   '''these vector font files, and to display the vector definitions of''       °
  333.  ' '''individual characters.''' 'do'                                           °
  334.   '''The right argument to function "readfile" is an integer specifying'       °
  335.  ''                                                                            °
  336.   '''the font file to be accessed. Here is the table listing the fonts''       °
  337.  ,r' '1 tab fonts' 'do'                                                        °
  338.   'r,''The function returns a nested array of length 4. Its components a       °
  339.  re''' '''the four parts of the vector font format.'',r'                       °
  340.   'show ''DISPLAY µ■readfont 14'''                                             °
  341.   '''If a left argument is present, it MUST be a single character. This'       °
  342.  ''                                                                            °
  343.   '''optional left argument specifies the symbol array to be displayed.'       °
  344.  ''                                                                            °
  345.   '''In that case the function invokes the algorithm described on page 2       °
  346.  10'''                                                                         °
  347.   '''of the User''''s Manual to display the array that will generate the       °
  348.  ''' '''character in that font'',r'                                            °
  349.   'show ''T╜''''I'''' readfont 14 ╪ T╜''''A'''' readfont 21'''                 °
  350. X '''This is the end of the lesson.'''                                         °
  351. *(1992 9 26 10 36 16 436)                                                      °
  352.  FTEST ÉFX 'U╜V TEST W;T' 'Σ Test a sequence of graphic commands (W)'          °
  353.   'T╜(0=ÉNC ''V'')doif ''V╜0'''                                                °
  354.   '╕((2=ÉSVO ''D207'')doif ''D207╜''''OPEN'''' V'')/L0'                        °
  355.   'T╜207 ÉSVO ''D207'''                                                        °
  356.   '╕((U╜2⌠ÉSVO ''D207'')doif ''''''AP 207 could not be opened'''''')/0'        °
  357.   '╕((~(╞V)ε0 4 5 6 13 14 15 16 17 18)doif ''''''Invalid MODE'''''')/0'        °
  358.   'D207╜''OPEN'' V' 'D207╜''OPEN'' ''''' 'T╜2πD207'                            °
  359.   'L0:T╜(0=ÉNC ''MODE'')doif ''MODE╜,(modes[;1]=T)≡modes''' 'D207╜W'           °
  360.   'U╜D207' 'T╜(1=µ,V)doif ''do'''                                              °
  361.   'T╜(0=²1╞2╞V)doif ''D207╜''''CLOSE'''' '''''''''' ''T╜ÉEX ''''D207''''       °
  362. X'''                                                                           °
  363. XCa 0 %                                                                        °
  364. *(1992 2 29 8 32 29 448)                                                       °
  365.  Faddquote ÉFX 'u╜addquote w'                                                  °
  366.   'Σ Put quotes around a string, and double existing quotes'                   °
  367. X 'u╜ÉAV[40],((1+w=ÉAV[40])/w),ÉAV[40]'                                        °
  368. XAaf╜('DEFAULT')('GOTITA')('THKRNDF')('THKRNDO')                               °
  369. *(1992 2 29 8 32 29 448)                                                       °
  370. XFaq ÉFX 'u╜aq w' 'Σ Enclose quoted string' 'u╜Γaddquote w'                    °
  371. *(1992 2 29 8 32 30 452)                                                       °
  372.  Fav ÉFX 'av;a;n;i;ÉIO' 'Σ Display characters in the Atomic vector'            °
  373.   'ÉIO╜0' 'a╜22 78µ'' ''' 'n╜3 0«φ12 22µ1+∞256'                                °
  374.   'a[;,(6⌡∞12)°.+2 3 4]╜n' 'a[;6+6⌡∞12]╜φ12 22µÉAV'                            °
  375. X 'a[7 8 10 13;6]╜'' ''' 'a[14+∞8;68 69 70 72]╜'' ''' 'a'                      °
  376. *(1992 2 29 8 32 32 460)                                                       °
  377.  Fback ÉFX 'back;T' 'Σ Reset screen to 25⌡80 size' 'OPEN 124' 'C124╜0 3'       °
  378. X 'CLOSE 124 206'                                                              °
  379. *(1996 8 5 14 6 58 428)                                                        °
  380.  Fcopyright ÉFX 'copyright' 'Σ Copyright statement'                            °
  381.   '(10µ'' ''),''Copyright, Z. V. Jizba, 1995,1996'',r'                         °
  382.   '''To see disclaimers, enter ÉCR ''''copyright''''''' 'do' '╕0'              °
  383.   '''This and subsequent workspaces labelled TEACHxx are made available'       °
  384.  ''                                                                            °
  385.   '''at no cost to anyone who desires to learn how to use effectively'''       °
  386.   '''the IBM/OS2 version of APL2.'',r'                                         °
  387.   '''This software is provided "AS IS" with no WARRANTY of any kind, eit       °
  388.  her'''                                                                        °
  389.   '''express or implied. Any risk in its use resides with you, the user        °
  390. Xof''' '''these tutorials.''' '''(PRESS ENTER to continue)'''                  °
  391. XCd 0 "                                                                        °
  392. *(1992 2 29 8 32 33 464)                                                       °
  393.  Fdate ÉFX 'u╜date w' 'Σ Format date and time of day' 'u╜«6╞w'                 °
  394. X 'u╜('' ''⌠u)Γu' 'u╜εu,■''-- .. '''                                           °
  395. XCdig 1 10 1234567890                                                          °
  396. *(1992 2 29 8 32 28 444)                                                       °
  397.  Fdo ÉFX 'do;t;e;b' 'Σ Expression driver' 'e╜''''' 'æ╜''       ''' 't╜æ'       °
  398.   '╕(^/'' ''=t)/0'                                                             °
  399.   '╕(('':''εt)doif ''b╜evaldd (+/^\'''' ''''=t)╟t'')/2'                        °
  400.   '''e╜ÉEM'' ÉEA t' '╕(0=µ,e)/2'                                               °
  401.   '''This is not a valid APL2 expression''' 'æ╜''*''' '╕(''?''⌠╞1╟æ)/2'        °
  402. X 'e' '╕2'                                                                     °
  403. *(1992 2 29 8 32 28 444)                                                       °
  404.  Fdoif ÉFX 'U╢╜V╢ doif W╢;t╢' 'Σ Rule' '╕(^/~U╢╜V╢)/0'                         °
  405. X '''U╢╜V╢ doif■ W╢'' ÉEA ''»V╢/W╢'''                                          °
  406. XNdos 0 ²26                                                                    °
  407. *(1996 8 4 12 11 37 352)                                                       °
  408.  Fdropfont ÉFX 'U╜dropfont W;B;T' 'Σ drop fonts W'                             °
  409.   'U╜'''' ╪ ╕(0=ÉNC ''af'')/0 ╪ ╕(2=╧W)/L0' 'W╜,ΓW'                            °
  410.   'L0:af╜(~B╜afεW)/af' 'L1:╕(0=µW)/0'                                          °
  411. X 'L1:D207╜''fontdef''((1πW)²1) ╪ U╜U,D207' '╕(0<µW╜1╟W)/L1'                   °
  412. XCe 1 0                                                                        °
  413. *(1996 7 24 14 20 54 540)                                                      °
  414.  Fend ÉFX 'end' 'e╜''''' 'æ╜''       ''' 't╜æ' '╕(^/'' ''=t)/L0'               °
  415.   '╕(('':''εt)doif ''b╜evaldd (+/^\'''' ''''=t)╟t'')/3'                        °
  416.   '''e╜ÉEM'' ÉEA t' '╕(0=µ,e)/L0'                                              °
  417.   '''This is not a valid APL2 expression''' 'æ╜''*'''                          °
  418. X '╕(''?''⌠╞1╟æ)/L0' 'e' 'L0:''²²'''                                           °
  419. *(1992 2 29 8 32 30 452)                                                       °
  420. XFendd ÉFX 'endd' 'Σ End of document' '20µ''²''' 'do'                          °
  421. *(1996 8 8 12 9 4 228)                                                         °
  422.  Ferase ÉFX                                                                    °
  423.   'erase;t;b;DISPLAY;DOS;GO;FRAME;NODIST;SVOFFER;SVOPAIR;FONTS'                °
  424.   't╜ÉNL 3' 't╜(~t^.εlc,'' '')≡t'                                              °
  425.   't╜(~(t[;∞5]^.=''TEACH'')δt[;∞4]^.=''TEST'')≡t' 't╜ÉEX t' 't╜ÉNL 2'          °
  426. X 't╜ÉEX(~t^.εlc,'' '')≡t' 't╜ÉNL 4' 't╜ÉEX(~t^.εlc,'' '')≡t'                  °
  427. *(1992 2 29 8 32 32 460)                                                       °
  428.  Fevaldd ÉFX 'u╜evaldd w;c;n'                                                  °
  429.   'Σ Evaluate a direct definition expression' 'u╜0' 'n╜(w∞''Σ'')-1'            °
  430.   'c╜(((n╞w)⌠'':'')Γn╞w),Γ''ΣDD '',(n+1)╟w' '╕(label╞c)/0'                     °
  431.   '╕((2=µc)doif ''u╜showdd 1╙c'')/0'                                           °
  432.   '╕((3=ÉNC╞c)doif ''u╜⌡µÉ╜(╞c),'''' is already defined.'''''')/0'             °
  433.   '╕((3=µc)doif ''u╜simdd c'')/0' 'c╜(Γ''α∙ aw'')replace■c'                    °
  434.   'u╜ε''u╜'',((''a''εεc[2 3 4])/''a ''),(╞c),'' w;t;b'''                       °
  435.   'u╜u(5πc)(''b╜(t╜'',(3πc),'')/'',addquote ''u╜'',4πc)'                       °
  436. X 'u╜u,''╕(t doif b)/0''(''u╜'',2πc)' 'u╜╧ÉFX u'                               °
  437. *(1992 2 29 8 32 32 460)                                                       °
  438.  Fexit ÉFX 'exit w' 'Σ Exit if there are too many suspended functions'         °
  439. X '╕((10>µÉLC)doif ''w'')/0' '''Please re-enter '',w' '╕'                      °
  440. XCf 1 2  {                                                                     °
  441.  Afonts╜('GOTENG')('GOTGER')('GOTITA')('GRESER')('GRESIM')('MARKERS')('M       °
  442.  ODSIM')('ROMDUP')('ROMDUPF')('ROMITA')('ROMITAB')('ROMSER')('ROMSERB')(       °
  443.  'ROMSIM')('ROMSIMM')('SANSER')('SANSERF')('SCRIPT')('THKRNDF')('THKRNDO       °
  444. X')('THKSQUF')('THKSQUO')                                                      °
  445. XCfpath 1 17 D:\APL2OS2\FONTS\                                                 °
  446. XCg 1 2 }                                                                      °
  447. *(1996 3 12 15 27 53 504)                                                      °
  448.  Fget ÉFX 'u╜v get w;t;ÉPR' 'Σ Prompt for response from keyboard'              °
  449.   't╜(0=ÉNC ''v'')doif ''v╜1'' ╪ ÉPR╜''''' 'w╜w,(~²1╞v)/'': '''                °
  450.   'L0:æ╜w' 't╜æ' '╕((''╕''=(µw)╟t)doif ''╕'')/0' '╕(^/'' ''=w)/L1'             °
  451.   '╕((~w╧(µw)╞t)doif ''''''PLEASE DO NOT BACKSPACE'''''')/L0'                  °
  452.   't╜(µw)╟t' 'L1:u╜(²1+(,'' ''⌠t)∞1)╟t' '╕(1╞v)/0' 't╜(u⌠'' '')Γu'             °
  453. X 'u╜(µt),(Γu),t'                                                              °
  454. *(1996 8 4 13 59 47 588)                                                       °
  455.  Fgetfont ÉFX 'U╜getfont W;A;N;F' 'Σ retrieve fonts W'                         °
  456.   'U╜0 ╪ ╕(0<ÉNC ''af'')/L1 ╪ af╜,Γ''DEFAULT'''                                °
  457.   'L1:W╜,W ╪ W╜0,(Wε0,∞22)/W' 'L0:╕(0=µW╜1╟W)/0' '╕(0=A╜╞W)/L0'                °
  458.   'F╜εfpath,(N╜πfonts[A]),''.AVF'''                                            °
  459. X 'D207╜''FONTDEF''(N F) ╪ ╕(0⌠╞╞U╜D207)/0 ╪ af╜af,ΓN' '╕L0'                   °
  460. *(1996 3 10 15 8 33 340)                                                       °
  461.  Fglobals ÉFX 'globals;T;D207' 'Σ Initialize useful global variables'          °
  462.   'r╜2╙ÉTC' 'q╜40╙ÉAV' 's╜Φp╜'' '',d╜35╙ÉAV'                                   °
  463.   'sv╜(100 211 80 206)(210 124)' 'uc╜''ABCDEFGHIJKLMNOPQRSTUVWXYZ'''           °
  464.   'lc╜''abcdefghijklmnopqrstuvwxyz''' 'dig╜''1234567890'''                     °
  465.   'g╜Φ'' '',h╜126╙ÉAV' 'f╜ÉAV[33 124]' 'a╜38╙ÉAV' 'ul╜''²'''                   °
  466.   'T╜207 SVOFFER ''D207''' 'D207╜''QUERY'' ''''' 'modes╜,3πD207'               °
  467.   'path╜''D:\APL2OS2\WORK\''' 'Σ''The current path is '',path'                 °
  468.   'ΣT╜1 get ''Enter new path if incorrect, else press Enter: '''               °
  469.   'Σ╕((0<µT)doif ''path╜T'')/0' 'fpath╜''D:\APL2OS2\FONTS\'''                  °
  470.   '''For this lesson you must specify a path to the FONT files.'''             °
  471.   '''The current path is '',fpath'                                             °
  472.   'T╜1 get ''Enter new path if incorrect, else press Enter: '''                °
  473. X '╕((0<µT)doif ''fpath╜T'')/0'                                                °
  474. XCh 0 }                                                                        °
  475. *(1992 8 10 10 44 11 380)                                                      °
  476.  Findex ÉFX 'U╜V index W;A;C;H;I;T' 'Σ List contents of an AP 211 file'        °
  477.   'T╜~(1<╧W)doif ''H╜2πW'' ''W╜1πW''' 'T╜T doif ''H╜''''FUNCTION'''''''        °
  478.   'T╜(ΓW)ε''DOCS'' ''UTILITY'' ''HELP'' ''TUTOR'''                             °
  479.   'T╜T doif ''W╜path,W,''''.211''''''' '1 OPEN 211' 'D211╜''USE'' W'           °
  480.   '''File '',W,'' has record length='',1╟D211'                                 °
  481.   'D211╜''LIST'' ''NAMES''' 'U╜D211'                                           °
  482.   '╕((0=╧U)doif ''U╜''''Unknown file'''''')/0' 'C╜1╟µU╜U[I╜ÉAV√U;]'            °
  483.   '╕((0=ÉNC ''V'')doif ''CLOSE 211'')/0' 'U╜(C╞H),[1]ul,[1]U'                  °
  484.   '╕((0=1╞V)doif ''U╜0 0 2 tab U'' ''CLOSE 211'')/0'                           °
  485.   'D211╜''LIST'' ''ATTS''' 'A╜D211'                                            °
  486.   'A╜(''SZ'' ''ID'' ''DATE'' ''mo'' ''d'' ''TIME'' ''m'' ''s'' ''ms''),[       °
  487.  1]ul,[1]A[I;]' 'V╜(Vε0,(∞9),-∞9)/V' 'U╜U,«A[;(0⌠V)/|V]'                       °
  488.   '╕((0εV)doif ''CLOSE 211'')/0'                                               °
  489.   'T╜~(0<╛/V)doif ''U╜U[∞2;],[1](2 0╟U)[√(2 0╟A)[;|V];]'''                     °
  490.   'T╜T doif ''U╜U[∞2;],[1](2 0╟U)[ⁿ(2 0╟A)[;|V];]''' 'T╜ÉDL 1'                 °
  491. X 'CLOSE 211'                                                                  °
  492. *(1996 8 3 13 21 48 436)                                                       °
  493.  Finfonts ÉFX 'U╜infonts;T' 'Σ List active fonts in the workspace'             °
  494. X 'U╜Γ''DEFAULT'' ╪ ╕(0=ÉNC ''af'')/0' 'U╜πaf'                                 °
  495. *(1996 3 10 14 58 1 408)                                                       °
  496.  Finitialize ÉFX 'initialize;t;C2'                                             °
  497.   'Σ  Initialize workspace. (To add to "sv" keep 100 FIRST)' 'erase'           °
  498. X 'globals'                                                                    °
  499. *(1992 2 29 8 32 29 448)                                                       °
  500.  Fkeys ÉFX 'keys' 'Σ Display keyboard'                                         °
  501.   '''        1  2  3  4  5  6  7  8  9  0  +  ⌡'''                             °
  502.   '''SHFT ╒  ■  ²  <  ≤  =  ≥  >  ⌠  δ  ^  -  ÷'''                             °
  503.   '''ALT  ╘  ƒ  ·  ⁿ  √  Φ  φ  Θ  ╡  τ  σ  !  Æ''' ''''''                      °
  504.   '''         Q  W  E  R  T  Y  U  I  O  P  ╜  ╙  ╧'''                         °
  505.   '''SHFT     ?  ∙  ε  µ  ~  ╞  ╟  ∞  Ω  *  ╕  ╨  ╤'''                         °
  506.   '''ALT      q  w  e  r  t  y  u  i  o  p  æ  ≈  ╥'''                         °
  507.   '''CTRL     ┌  ┬  ┐              ╔  ╦  ╗''' ''''''                           °
  508.   '''          A  S  D  F  G  H  J  K  L  [  ]'''                              °
  509.   '''SHFT      α  ⌐  ╛  _  ╖  ╢  °  ''''  É  (  )'''                           °
  510.   '''ALT       a  s  d  f  g  h  j  k  l  »  «'''                              °
  511.   '''CTRL     ├  ┼  ┤       ─  ═    ╠  ╬  ╣''' ''''''                          °
  512.   '''           Z  X  C  V  B  N  M  ,  .  /'''                                °
  513.   '''SHFT       Γ  π  ∩  ¼  ¥  ÿ  |  ;  :  \'''                                °
  514.   '''ALT        z  x  c  v  b  n  m  Σ  ±  ≡'''                                °
  515.   '''CTRL      └  ┴  ┘  │  ║      ╚  ╩  ╝''' ''''''                            °
  516. X '''Toggle switch to ASCII is CTL-BACKSPACE''' '''CTRL+G gives beep'''        °
  517. *(1992 2 29 8 32 32 460)                                                       °
  518.  Flabel ÉFX 'u╜label w'                                                        °
  519.   'Σ Return 1 if w is not a valid character string label (also excludes        °
  520. Xl.c.)' '╕(u╜(1<µµw)δ1<╧w)/0' '╕(u╜~^/wεlc,uc,dig)/0' 'u╜w[1]εlc,dig'          °
  521. XClc 1 26 abcdefghijklmnopqrstuvwxyz                                           °
  522. XNmodes 1 10 1 800 600 65536 8 256 19 10 2826 2830                             °
  523. *(1992 2 29 8 32 33 464)                                                       °
  524.  Fnon ÉFX 'non;t;rc;et;r'                                                      °
  525.   'Σ Ignore invalid keyboard entries, but evaluate valid APL2 expression       °
  526.  s' 'æ╜''       ''' 't╜æ' '╕(0=µ(t⌠'' '')/t)/0' '(rc et r)╜ÉEC t'              °
  527. X '╕(0=rc)/2' '╕((1=rc)doif ''r'')/2' '╕2'                                     °
  528. *(1992 2 29 8 32 32 460)                                                       °
  529.  Fnotb ÉFX 'u╜notb w' 'Σ Remove trailing blanks'                               °
  530.   '╕((1<╧w)doif ''u╜notb■ w'')/0' '╕((1<µµw)doif ''u╜πnotb Γ[2]w'')/0'         °
  531. X 'u╜(1-(,'' ''⌠Φw)∞1)╟w'                                                      °
  532. *(1996 8 4 12 52 57 596)                                                       °
  533.  Fopen ÉFX 'U╜open;T' 'Σ Activate AP 207' '╕(2=ÉSVO ''D207'')/U╜0'             °
  534.   'T╜ÉEX ''af''' 'T╜207 SVOFFER ''D207'''                                      °
  535. X 'D207╜''OPEN''(0 ''FONTS'' 760 560 0 0)' '╕(0=╞╞U╜test)/0 ╪ ╕'               °
  536. XCp 1 2  "                                                                     °
  537. XCpath 1 16 D:\APL2OS2\WORK\                                                   °
  538. *(1992 2 29 8 32 33 464)                                                       °
  539.  Fpause ÉFX 'v pause w;t'                                                      °
  540.   'Σ Pause, then print w v spaces right and return'                            °
  541. X 't╜(0=ÉNC ''v'')doif ''v╜6''' 'do' '(vµ'' ''),w' 'do'                        °
  542. *(1992 7 16 11 12 35 372)                                                      °
  543.  Fprint ÉFX 'print W;L;D80' 'Σ Print function W on an Epsom printer'           °
  544.   '╕((~(ÉNC W)ε3 4)doif ''''''This is not a function or defined operator       °
  545. X'''''')/0' 'OPEN 80' 'D80╜5' 'L╜,showfn W' 'D80╜π(L⌠r)ΓL' 'CLOSE 80'          °
  546. XCq 0 '                                                                        °
  547. XCr 0                                                                         °
  548. *(1996 8 8 13 22 5 288)                                                        °
  549.  Freadfont ÉFX 'U╜V readfont W;A;B;C;H;I;L;D;N;F;T;XY;Z;C210;D210'             °
  550.   'Σ retrieve font file W' 'U╜0 ╪ T╜210 SVOPAIR ''C210'' ''D210'''             °
  551.   'F╜εfpath,(N╜πfonts[W]),''.AVF''' 'Σ DISPLAY F'                              °
  552.   'C210╜''IR,'',F,'',D''' 'ΣC210' 'C210╜2' 'U╜D210' 'ΣC210 ╪ U'                °
  553.   'L0:C210╜2 0,U' 'T╜D210' 'ΣC210 ╪ µT' '╕(U>µT)/L0'                           °
  554.   'U╜ΓH╜256¥φ16 2µÉAF 32╞T' 'U╜U,ΓI╜256¥φ257 2µÉAF 32╟T'                       °
  555.   'U╜U,Γ512╞546╟T' 'U╜U,ΓD╜((²1╞I),2)µ1058╟T' '╕(0=ÉNC ''V'')/0'               °
  556.   'V╜ÉAF ''''µC╜V' 'Z╜ÉAF D[I[1+V]+∞-/I[2 1+V];]' 'B╜Z[;1]≥128'                °
  557.   'L╜Z[;2]≥128' 'XY╜+\²64+128|Z'                                               °
  558. X '''The letter '',C,'' in font '',N,'':''' 'DISPLAY B,L,XY'                   °
  559. *(1992 2 29 8 32 32 460)                                                       °
  560.  Freplace ÉFX 'u╜v replace w;i;r;s' 'Σ  Replace elements in v in w'            °
  561.   'i╜Γ∞µu╜w' 's╜2πv╜(v⌠'' '')Γv' 'i╜⌡r╜i⌡■Γ[1]w°.=╞v'                          °
  562. X 'u[(εi)/εr]╜s[(εi)/εi⌡■∞µs]'                                                 °
  563. *(1992 2 29 8 32 38 484)                                                       °
  564.  Freset ÉFX 'reset' 'Σ Reset parameters to initial screen'                     °
  565.   '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       °
  566. X 1 0'''                                                                       °
  567. *(1992 2 29 8 32 33 464)                                                       °
  568.  Fround ÉFX 'u╜v round w' 'Σ Half adjust w to vth decimal'                     °
  569. X 'u╜(╛0.5+w⌡10*v)÷10*v'                                                       °
  570. XCs 1 2 "                                                                      °
  571. *(1992 8 10 10 58 49 588)                                                      °
  572.  Fshared ÉFX 'U╜shared;T;C2;D2;E2'                                             °
  573.   'Σ List all shared variables currently active'                               °
  574.   'T╜2 ÉSVO■''C2'' ''D2'' ''E2'''                                              °
  575.   '╕((δ/2⌠T╜ÉSVO■''C2'' ''D2'' ''E2'')doif ''''''AP 2 not active'''''')/       °
  576. X0' 'C2╜0' 'U╜D2[;4]' 'U╜((εsv)εU)/εsv'                                        °
  577. *(1992 2 29 8 32 33 464)                                                       °
  578.  Fshow ÉFX '╢v show ╢w;╢t;╢b' 'Σ Display and execute ╢w'                       °
  579.   '╢t╜(0=ÉNC ''╢v'')doif ''╢v╜0'''                                             °
  580.   '╕((0=╧╢w)doif ''show ╢w,'''' '''''')/0'                                     °
  581.   '╕((1<╧╢w)doif ''╢v show■ ╢w'')/0' '''      '',╢w'                           °
  582. X '╕((╢v^'':''ε╢w)doif ''╢t╜evaldd ╢w'')/L0' '''ÉEM'' ÉEA ╢w' 'L0:do'          °
  583. *(1992 2 29 8 32 33 464)                                                       °
  584.  Fshowdd ÉFX 'u╜showdd w;a;b;c;r'                                              °
  585.   'Σ  Display a direct definition function'                                    °
  586.   '╕((1=╧w)doif ''u╜showdd Γw'')/u╜0'                                          °
  587.   '╕((3⌠ÉNC╞w)doif ''(ε╞w),'''' is not a function'''''')/0'                    °
  588.   'c╜Γ[2]ÉCR╞w' 'c╜notb(2╞c),(Γ''aw α∙'')replace■2╟c'                          °
  589.   '╕((~''ΣDD''╧3╞2πc)doif ''''''Not a direct definition function'''''')/       °
  590.  0' 'u╜1' 'b╜('' ''⌠╞c)Γ╞c' 'a╜''      ''' 'r╜2╟3πc'                           °
  591.   '╕((3=µc)doif ''a,(╞w),'''':'''',r,(3<µ2πc)/''''   Σ'''',3╟2πc'')/0'         °
  592.   'a╜a,(╞w),'':'',(2╟5πc),'':''' 'b╜(+\r=''('')-+\r='')''' 'b╜b∞0'             °
  593. X 'a╜a,(²3╟(b-1)╞3╟r),'':'',2╟»(b+2)╟r' 'a,(3<µ2πc)/''  Σ'',3╟2πc'             °
  594. *(1992 9 6 10 33 13 332)                                                       °
  595.  Fshowfn ÉFX 'u╜v showfn w;f;n;t;ÉIO' 'Σ Simulate the STSC ÉVR command'        °
  596.   't╜(0=ÉNC ''v'')doif ''v╜,0''' 'ÉIO╜0'                                       °
  597.   'u╜''      '',''╖'',w,''[É]'',(╞v)╞''╖''' 'n╜1╞µf╜ÉCR w'                     °
  598.   'v╜v[0],((1╟v)ε∞n)/1╟v' 'n╜«∞n' 'n╜(n⌠'' '')Γn'                              °
  599.   'f╜(π''['',■n,■Γ''] ''),f'                                                   °
  600.   't╜(1<µ,v)doif ''f╜f[1╟v;]'' ''u╜''''''''''' 'u╜²1╟u,r,,f,r'                 °
  601. X 'u╜((-+/^\'' ''=Φu)╟u),('' ''(r,''      ╖'',date 2 ÉAT w))[╞v]'              °
  602. *(1992 2 29 8 32 33 464)                                                       °
  603.  Fsimdd ÉFX 'u╜simdd w;e' 'Σ Simple direct definition mode' 'u╜0'              °
  604.   '╕((0⌠ÉNC╞w)doif ''''''Already defined'''''')/0' 'e╜''α''ε2πw'               °
  605.   'w[2]╜Γ''u╜'',''α∙ aw'' replace 2πw' 'w╜w[1 3 2]'                            °
  606. X 'w[1]╜Γε''u╜'',(e/''a ''),w[1],'' w''' 'u╜╧ÉFX w'                            °
  607. XAsv╜(100 211 80 206)(210 124)                                                 °
  608. XCt 1 7                                                                        °
  609. *(1992 6 3 9 59 17 424)                                                        °
  610.  Ftab ÉFX 'U╜V tab W;T;A;B;C;D;E;F;G;M;ÉPW' 'Σ Tabulate list W'                °
  611.   'T╜(0=ÉNC ''V'')doif ''V╜0''' 'M╜''Invalid data for tabulation'''            °
  612.   'V╜4╞V' 'ÉPW╜130╛30⌐G╜V[2]+79⌡V[2]=0'                                        °
  613.   'L1:╕((1<╧W)doif ''''''W╜∞0'''' ÉEA ''''W╜πW'''''')/L1'                      °
  614.   '╕(((0=µεW)δ2<µµW)doif ''U╜(~V╧4╞0)/M'')/0'                                  °
  615.   'T╜(1≥µµU╜«W)doif ''U╜πW╜(U⌠'''' '''')ΓU'''                                  °
  616.   'T╜(0<V[1])doif ''U╜(«(Φ1,╞µW)µ(V[3]µ'''' ''''),∞(╞µW)-V[3]),'''' ''''       °
  617.  ,U''' '╕(G<30)/0' 'T╜(F╜µεV[4])+C╜1╟B╜µA╜(V[3],0)╟U'                          °
  618.   'T╜⌐(1╞B)÷1⌐╛(ÉPW+F)÷T' 'U╜(E╜(V[3],C)╞U),[1](B╜T,1╟B)╞A'                    °
  619.   '''D╜εV[4]'' ÉEA ''D╜ÉAV[εV[4]+33⌡V[4]=0]''' 'L0:A╜(T,0)╟A'                  °
  620. X '╕(0=1╞µA)/0' 'U╜U,(((T+V[3]),µD)µD),E,[1]B╞A' '╕L0'                         °
  621. *(1996 7 19 13 48 24 508)                                                      °
  622.  Ftest ÉFX 'U╜test' 'Σ test return code' '╕(0=╞╞U╜D207)/0'                     °
  623. X '''SESSION ABORTED: The return code is '',╞U ╪ DISPLAYπU ╪ ╕'                °
  624. *(1992 9 5 9 10 34 316)                                                        °
  625.  Ftestap ÉFX 'U╜testap W;B;D;S;T'                                              °
  626.   'Σ Test for existence of specific AP"s' 'D╜''D'',■«■W╜,W'                    °
  627.   'T╜W ÉSVO■D' 'U╜0' '╕((^/B╜2=ÉSVO■D)doif ''T╜ÉEX■ D'')/0'                    °
  628.   'T╜''The following Auxilliary Processor'',(S╜1<+/~B)╞''s'''                  °
  629.   'T,(ε(S+1)╙'' is'' '' are''),'' not available'',(~B)/W' 'U╜1'                °
  630. X 'T╜ÉEX■D'                                                                    °
  631. XCuc 1 26 ABCDEFGHIJKLMNOPQRSTUVWXYZ                                           °
  632. XCul 0 ²                                                                       °
  633. *(1996 6 13 13 16 24 352)                                                      °
  634.  Fwarna ÉFX 'warna;T' 'Σ clear AP124 and explai'                               °
  635. X 'T╜ÉSVR■''C124'' ''D124''' 'T╜ÉEX■''C124'' ''D124'''                         °
  636. *(1996 8 3 11 54 14 424)                                                       °
  637.  Fwarnb ÉFX 'warnb;T' 'Σ clear AP124 and explain'                              °
  638.   '''WARNING: As you study this lesson, try to respond to all requests.'       °
  639.  ',r'                                                                          °
  640.   '''Of course as in all these tutorials, you are encouraged to experime       °
  641.  nt'''                                                                         °
  642.   '''at any pause. When an AP 207 command is issued, there may be an int       °
  643.  erval'''                                                                      °
  644.   '''of a second or two of no action, followed by a flash on the screen.       °
  645.  '''                                                                           °
  646.   '''If the graphic screen does not appear you may invoke the Ctrl-Esc''       °
  647. X' '''command to display any current AP 207 window.''' 'do'                    °
  648. *(1996 7 12 12 20 34 404)                                                      °
  649.  Fwarning ÉFX 'warning;T' 'Σ clear AP207 and explain' 'warna' 'warnb'          °
  650.   '''As in the previous lesson the function "test" is used to verify'''        °
  651.   '''that a command given to AP207 was successful. The function returns'       °
  652.  ''                                                                            °
  653.   '''a nested vector. The first element of this vector may be nested.'''       °
  654.   '''The take (╞) of this element contains the Return Code.'',r'               °
  655.   '''WARNING! Do not issue a TEST command while there is a graphic'''          °
  656.   '''window in the window list.'',r'                                           °
  657.   '''(You may also wish to view function "test" at this point.)'''             °
  658. X 'end'                                                                        °
  659. XNwt 0 2                                                                       °
  660.