home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
teachapl.zip
/
teach48.zip
/
TEACH48.ATF
Wrap
Text File
|
1996-08-08
|
70KB
|
853 lines
XNÉIO 0 1 °
XNÉCT 0 1.000000000000011E²13 °
XCÉFC 1 6 .,*0_² °
XNÉRL 0 1227464303 °
XCÉPR 0 °
XCÉLX 1 5 TEACH °
*(1992 2 29 8 32 29 448) °
FDISPLAY ÉFX 'D╜S DISPLAY A;ÉIO;R;C;HL;HC;HT;HB;VL;VB;V;W;N;B' °
'Σ DISPLAY A GENERAL ARRAY IN PICTORIAL FORM' °
'Σ NORMAL CALL IS MONADIC. DYADIC CALL USED ONLY IN' °
'Σ RECURSION TO SPECIFY DISPLAY RANK, SHAPE, AND DEPTH.' 'ÉIO╜0' °
'»(0=ÉNC ''S'')/''S╜µA''' 'R╜╞µ,S Σ PSEUDO RANK.' °
'C╜''┐┌└┘'' Σ UR, UL, LL, AND LR CORNERS.' °
'HL╜''─'' Σ HORIZONTAL LINE.' °
'HC╜HL,''Θ╕'',HL,''~+ε'' Σ HORIZONTAL BORDERS.' °
'HT╜HC[(0<R)⌡1+0<╞²1╞,S]' 'ΣW╜,0╧■╞0µΓ(1⌐µA)╞A' °
'HB╜HC[3+3╛(''2⌡~A╧«A'' ÉEA ''1+╞ε0⌡(1⌐⌡/µA)╞,A'')+3⌡1<µµS]' °
'VL╜''│'' Σ VERTICAL LINE.' °
'VB╜VL,''Φ╟'' Σ VERTICAL BORDER.' °
'V╜VB[(1<R)⌡1+0<²1╞²1╟,S]' °
'»(0εµA)/''A╜(1⌐µA)µΓ╞A'' Σ SHOW PROTOTYPE OF EMPTIES.' °
'╕(1<╧A)/GEN' '╕(2<µµA)/D3' °
'D╜«A Σ SIMPLE ARRAYS.' 'W╜1╞µD╜(²2╞1 1,µD)µD' °
'N╜²1+1╟µD' '╕(0=µµA)/SS' °
'D╜(C[1],V,((W-1)µVL),C[2]),((HT,NµHL),[0]D,[0]HB,NµHL),C[0],(WµVL),C[ °
3]' '╕0' 'SS:HB╜((0 '' '')=╞0µΓA)/'' -''' °
'D╜'' '',('' '',[0]D,[0]HB,Nµ'' ''),'' ''' '╕0' °
'GEN:D╜«DISPLAY■A Σ ENCLOSED ...' 'N╜Dδ.⌠'' ''' °
'D╜(Nδ~1ΦN)≡D' 'D╜(δ≡~'' ''╤D)/D' 'D╜((1,µS)µS)DISPLAY D' °
'╕(2≥µ,S)╟D3E,0' 'D3:D╜0 ²1╟0 1╟«ΓA Σ MULT-DIMENSIONAL ...' °
'W╜1╞µD' 'N╜²1+1╟µD' °
'D╜(C[1],V,((W-1)µVL),C[2]),((HT,NµHL),[0]D,[0]HB,NµHL),C[0],(WµVL),C[ °
3]' 'D3E:N╜²2+µ,S' °
X 'V╜C[Nµ1],[0]VB[1+0<²2╟,S],[0](((²3+╞µD),N)µVL),[0]C[Nµ2]' 'D╜V,D' °
XCF 1 27 D:\APL2OS2\FONTS\SCRIPT.AVF °
XCN 1 6 SCRIPT °
*(1995 4 23 14 14 6 304) °
FSVOFFER ÉFX 'DC╜PID SVOFFER SV' 'SV╜(²2╞1 1,µSV)µSV╜πSV' °
'╕(2=ÉNC ''PID'')/DYADIC' 'DC╜ÉSVO SV ╪ ╕0' °
'DYADIC:╕(1^.⌠DC╜PID ÉSVO SV)/END' 'ÉSVE╜15' °
'CHECK:╕(1^.⌠DC╜ÉSVO SV)/END' '╕(0⌠ÉSVE)/CHECK' °
X 'END:SV╜1 0 1 0 ÉSVC SV' °
*(1996 7 30 13 37 39 568) °
FTEACH ÉFX 'TEACH' 'Σ Copyright Z V Jizba 1991; all rights reserved' °
'copyright' 'initialize' 'do' 'warning' °
'TEACH1 Σ Image and vector font files' °
'TEACH2 Σ Box around a drawn text' °
'TEACH3 Σ Difference between image and vector fonts' °
'TEACH4 Σ Writing over graphic text does NOT erase it' °
'TEACH5 Σ The command FONTDEF' °
'TEACH6 Σ Default font and APL2 vector fonts' °
'TEACH7 Σ Parameters of command FONT' °
'TEACH8 Σ The SIZE font parameter' °
'TEACH9 Σ Text inclination and justification' °
'TEACH10 Σ Shear and text stretching or squeezing' °
'TEACH11 Σ The four font parameters' °
X 'TEACH12 Σ Ranges of default and vector font parameters' °
*(1996 8 8 13 51 10 424) °
FTEACH1 ÉFX 'TEACH1;T' 'Σ Drawing text. Commands FONT FONTDEF' °
'''In this lesson we will learn how to display text on the graphic''' °
'''screen.'',r' '''VECTOR FONTS'',r' °
''' In addition to the built in "image font", IBM supplies a number'' °
' °
'''of "vector font files". At the start of the lesson you were asked'' °
' °
'''to specify the path to the directory containing special IBM files'' °
' °
'''with the extension ".AVF". You will be able to display text in any' °
'' °
'''one of these fonts by retrieving a desired image font file at the'' °
' '''time the graphic screen is activated. At present there are 22''' °
'''different vector fonts available to AP 207.''' 'do' °
'''The location of AVF type files will vary for different configuratio °
ns.''' °
'''For some it will be in a directory such as "C:\APL2OS2", for others °
it''' °
'''may be "A:". Whathever the path, it must be known to this lesson,'' °
' °
'''because it will be used to acces font files. If you failed to defin °
e''' °
'''the path at the start of the lesson, you may do so now by assigning °
''' °
'''the proper path to variable "fpath" (e.g. fpath╜''''A:\'''').''' °
X '╕(''\''=²1╞path)/L0' 'path╜path,''\''' 'L0:end' °
*(1996 8 1 14 28 30 388) °
FTEACH10 ÉFX 'TEACH10;B;FR;T;D207' 'Σ Shear and magnification' °
'''Two of the eight parameters of command FONT have no implementation. °
''' °
'''Parameters 5 and 8 must be set currently to zero. (Failure to do so °
''' °
'''will produce a return code 39 "INVALID PARAMETER"). Names have been °
''' °
'''assigned to these parameters giving a clue to their purpose if and' °
'' '''when in a later version of APL2 they may be implemented.'',r' °
'''Parameter 5 is called "DIRECTION", and parameter 8 is called "NOPAR °
SE".''' 'do' °
'''The sixth parameter is called "shear". A positive value (measured i °
n''' °
'''degrees) will tilt the characters to the right. A negative value wi °
ll''' °
'''tilt the letters to the left (NOTE: we again set "wt" to 2'',r' °
'show ''B╜16 0 0 0 0 ╪ wt╜2''' °
'show ''T╜16 (B,10) (B,²10) TESTFONT 7 7 7''' 'show ''DISPLAY T''' °
'''The seventh parameter called XMAG can be used to stretch or to sque °
eze''' °
'''the text. The default is 1. A value greater than 1 will stretch the °
''' '''text and a value less than 1 will squeeze it''' 'do' °
'show ''T╜16 (B,0 1.2) (B,0 .5) TESTFONT 7 (7 0 300) 7''' °
X 'show ''DISPLAY T''' 'end' °
*(1996 8 1 14 39 54 528) °
FTEACH11 ÉFX 'TEACH11;B;M;T;D207' 'Σ Additional font parameters' °
'''When the command FONT is issued with a null string, the return vect °
or''' °
'''contains not only the eight font parameters we have just described, °
''' °
'''but also an additional four values. These values are related to the °
''' °
'''font height, but describe primarily the numeric characteristics of' °
'' '''specific fonts'',r' °
'T╜207 SVOFFER ''D207'' ╪ D207╜''OPEN''(0 ''FONTS'' 760 560 0 0) ╪ T╜t °
est' 'F╜εfpath,(N╜''SCRIPT''),''.AVF'' ╪ D207╜''FONTDEF''(N F)' °
'''To illustrate the contents of the FONT parameters, we have retrieve °
d''' °
'''from the FONT files the font SCRIPT, and assigned it a height of 40 °
'',r' 'show ''D207╜''''font''''(''''SCRIPT'''' 40) ╪ T╜test''' °
'''We can now look at the last four FONT parameters'',r' °
'show ''D207╜''''font'''' '''''''' ╪ DISPLAY T╜9╟2πtest''' °
'''The first of these is called BOX-HEIGHT.''' °
'''The second value is called DESCENDER HEIGHT. it gives the space all °
owed''' °
''' below the text for certain lower case letters such as "jgq".''' °
'''The third value gives the size of maximum LETTER WIDTH''' °
'''The last value as we already have mentioned is FONT TYPE (0=IMAGE 1 °
=VECTOR)''' 'do' °
'''One could assume that the first two values delimit the bounds of th °
e text.''' °
'''For most characters in most fonts this is true, but there are excep °
tions'',r' °
'show ''M╜50 300 ╪ D207╜''''move'''' M ''''write'''' ''''Tf'''' ╪ D207 °
╜''''move'''' ''''''''''' °
'''We wrote the string "Tf" using the SCRIPT font. Then invoked the MO °
VE ''''''''''' '''command to extract the current position'',r' °
'show ''T╜4╞2πtest ╪ D207╜''''font'''' '''''''' ╪ B╜²4╞2πtest ╪ M[2]╜M °
[2]-B[2]''' °
'''We also extract the last four FONT parameters, and modify the start °
ing''' °
'''position to include the "descender height" (i.e. the projection bel °
ow''' '''the text line that includes those letters such a "g")'',r' °
'show ''T[2]╜T[2]+-/B[1 2] ╪ D207╜''''move'''' M ''''box'''' T ╪ DISPL °
AY T B M''' °
'''We also add to T (the current position on the text line) the height °
''' '''of Upper case letters.''' 'do' °
'show ''D207╜''''view'''' '''''''' ''''wait'''' 2''' °
'''(Did you finally click on the Session manager screen? An APL2OS2 bu °
g?)''' °
'''The lower case letter F in the script font extends below and to the °
''' °
'''right of the box. This, so that this particular font will have the' °
X'' '''appearance of written text.''' 'end' °
*(1996 7 30 13 30 29 500) °
FTEACH12 ÉFX 'TEACH12' 'Σ Letter width and conclusion to fonts' °
'''The third extra parameter gives the maximum width of the symbols''' °
'''in the font. This value as well as the box height and the descender °
''' °
'''height have somewhat different values for different fonts. The mini °
mum''' °
'''and maximum values for a font size of 9 are given in the table belo °
w'',r' °
''' MINIMUM MIN-FT MAXIMUM MAX-FT DEFAULT °
''' °
''' BOX-HEIGTH 16.239 THKND* 16.286 ROM*,G* 16''' °
''' DESCENDER-HEIGHT 3.429 ROM*,G* 3.620 SANSER* 5''' °
''' MAXIMUM-WIDTH 8.571 ROMSIMM 14.571 ROMITAB 8'', °
r' °
'''Note that for the default mode all three values are outside the ran °
ge''' '''of file-vector fonts.'',r' °
'''(The values are rounded to 3 digits. The asterisks are used in the' °
'' °
'''font names to indicate all fonts beginning with the letters in fron °
t''' '''of the *.)'',r' °
'''Finally, before leaving this workspace-lesson, you may wish to''' °
'''study function TESTFONT.''' 'do' °
X '''We will pursue the study of fonts in the next lesson''' °
*(1996 8 8 13 51 23 476) °
FTEACH2 ÉFX 'TEACH2;T' 'Σ The command WRITE' '''THE COMMAND WRITE'',r' °
''' The command WRITE will draw the character string argument beginni °
ng''' °
'''at the current position. In the example, we will first move to (50 °
300),''' °
'''a place away from the (0 0) origin, and then write the word "Messag °
e".''' °
'''We will use, but not describe function TESTWRITE. (This function co °
ntains''' '''commands that have not yet been discussed here.)'',r' °
'''This function will display a larger than default view of text, so'' °
' °
'''that we can study the parameters that relate to the command WRITE.' °
'' °
'''It will return the eight elements specifying the 4 x,y coordinates' °
'' '''of the box that "contains" this text.''' 'do' °
'show ''T╜TESTWRITE ''''Message''''''' °
'''Note the size of the text. Let us now look at the returned values'' °
,r' 'show ''DISPLAY 4 2µT''' °
'''After the WRITE command is issued, a reference to the shared variab °
le''' °
'''returns this numeric array as a vector. These values correspond to' °
'' °
'''the four corners of a box that contains the text. However, this box °
''' '''does NOT enclose "tightly" the text.''' 'do' °
'''Function TESTWRITE can be used to illustrate these numeric paramete °
rs.''' °
'''When it is issued with a left argument, it will draw a box around t °
he''' °
'''text and mark the four x,y coordinates with the first four markers. °
''' °
'''It will also mark the location (50 300) with marker 10 (a circle).' °
'' °
'''This is the starting point of the text defined by a MOVE command. I °
t''' '''defines the baseline of the text.''' 'do' °
'show ''T╜1 TESTWRITE ''''Message''''''' °
'''Note that the box extends above beyond the upper case letter. The'' °
' °
'''lower line of the box extends below the text baseline to include th °
e''' °
'''lower projection of the lower case letter "g". There is also space °
Xto''' '''the left and to the right of the text.''' 'end' °
*(1996 8 8 13 51 50 584) °
FTEACH3 ÉFX 'TEACH3;D;T;D207' 'Σ IMAGE and VECTOR fonts' °
'''We mentioned before that there are two types of font. The IMAGE fon °
t''' °
'''is the default font that is used in displaying APL2 text. This font °
''' °
'''is "drawn" by command WRITE if no VECTOR font is active. It is the' °
'' °
'''graphic equivalent of the APL2 text font, and therefore is NOT chan °
ged''' '''by the VECTOR font commands.'',r' °
'''Function TEST illustrates this. (This function is again not display °
ed''' °
'''because it too invokes commands not yet discussed.) TEST takes as t °
he''' °
'''right argument any AP207 command, but we will use it mostly to invo °
ke''' °
'''the WRITE command. The left argument to TEST is an integer specifyi °
ng''' °
'''the font to be displayed. TEST sets the font size to 50 pels, but a °
s we''' °
'''shall see, the size of the IMAGE font always remains the same.'',r' °
'''In the next example we retrieve one of the VECTOR fonts (#18).''' °
'do' 'show ''T╜18 TEST ''''write'''' ''''Message''''''' °
'''When TEST is used monadically or wtih 0 as left argument it will''' °
'''default to the image font.'',r' 'do' °
'show ''T╜TEST ''''WRITE'''' ''''Message''''''' °
'''Function TEST returns the return code and the "box" vector'',r' °
X 'show ''DISPLAY T''' 'end' °
*(1996 8 8 14 2 30 312) °
FTEACH4 ÉFX 'TEACH4;M;B;T;X;Y;D207' °
'Σ Using blanks does not erase markers' °
'''CHARACTERISTICS OF THE IMAGE FONT'',r' °
'''Because the IMAGE font is not affected by FONT commands, we have to °
''' '''verify its graphical properties.'',r' °
'''One important question to be answered is whether blank characters o °
f''' °
'''image text will erase previously drawn image font text.(These comme °
nts do''' °
'''not apply to VECTOR fonts since those are based on line drawing rul °
es.)'',r' °
'''Let us try first to owerwrite image text over image text'',r' °
'show ''M╜''''Message'''' ╪ B╜'''' | | | '''' ╪ X╜100 100''' °
'show ''T╜TEST ''''MOVE'''' X ''''WRITE'''' M ''''MOVE'''' X ''''WRITE °
'''' B''' °
'''Clearly, writing image text on top of image text will not change th °
e''' °
'''previous contents; the new text is superimposed on the old text.'', °
r' '''Next, we will evaluate how the image font affects graphs'',r' °
'show ''Y╜6 2µ100 102 ╪ Y[;1]╜Y[;1]+10⌡0,∞5''' °
'''The array Y represents a straight dashed horizontal line through''' °
'''the portion to be overwritten with image text''' 'do' °
'show ''T╜TEST ''''DRAW'''' Y ''''MOVE'''' X ''''WRITE'''' M''' °
'''Here too, the line drawn first is not erased by the overlay of text °
.''' °
'''Finally, let us also verify that markers will not be erased by text °
''' 'do' °
'show ''T╜TEST ''''MARKER'''' Y ''''MOVE'''' X ''''WRITE'''' M''' °
'''We have verified that image text in general, and blanks in particul °
ar''' °
'''will not erase previously drawn graphs. There is a way to do that, °
and''' °
'''we will learn the process when we cover colors. Right now let us''' °
X '''return to the drawing of text.''' 'end' °
*(1996 8 6 21 10 59 480) °
FTEACH5 ÉFX 'TEACH5;M;T;D207' 'Σ The FONTDEF command' °
'''FONTDEF AND FONT'',r' °
'''As was mentioned before, IBM supplies 22 special vector fonts. Here °
is''' °
'''a listing of these font names (stored as *.AVF type files)'',r' °
'show ''1 tab fonts''' °
'''If a graph is to display one of these fonts, the desired font file' °
'' °
'''must be first brought into the workspace. Function TESTFONT has bee °
n''' °
'''designed to illustrate the various aspects of font generation. We'' °
' °
'''will, however, again omit a detailed description of this function.' °
',r' °
'''The right argument to TESTFONT is an integer, (or a vector of integ °
ers)''' °
'''in the range 1-22. It represents the desired font to be displayed.' °
'' °
'''The left argument describes the size and shape of the font. The fun °
ction''' °
'''invokes the command VIEW to display a sample of the requested font. °
It''' °
'''also invokes the command WAIT wt. The right argument (wt) is a glob °
al''' °
'''variable containing the number of seconds the graph is to stay visi °
ble''' '''the current value of "wt" is'',r' 'wt╜2' 'show ''wt''' °
'''Therefore the view will be displayed only 2 seconds. The function'' °
' °
'''returns an array of the fonts displayed and the parameters associat °
ed''' '''with each font.'',r' °
'''Let us first invoke TESTFONT with only the right argument''' 'do' °
'show ''T╜TESTFONT 8''' °
'''The function invokes two commands: FONTDEF and FONT. Command FONTDE °
F''' °
'''is used to bring into the workspace one of the 22 IBM fonts (or for °
''' °
'''that matter any other font file that may have been generated). The' °
'' °
'''usage of this command is illustrated on lines [10], [13] and [19]of °
X''' '''function TESTFONT'',r' 'TEACH5A' 'end' °
*(1996 8 6 21 12 26 356) °
FTEACH5A ÉFX 'TEACH5A;M;T;D207' 'Σ The LINETYPE command' °
'0 10 13 19 showfn ''TESTFONT''' °
'r,''On line [10] we see the assignment to two local variables, N and °
F.''' °
'''(The global variable "fonts" was initialized at the start of this'' °
' °
'''session. It contains the names of all IBM fonts. Variable "O" conta °
ins''' '''the font that is to be displayed next.)''' 'do' °
'''N contains just the name of the font. F is the full name, including °
''' °
'''the path of the file containing the desired font. On line [13], the °
''' °
'''command FONTDEF has two arguments (enclosed as a scalar). The first °
''' °
'''is the name of the font (N), and the second the name of the file (F °
).''' °
'''Before the font can actually be used, it has to be made active with °
''' °
'''command FONT to be described shortly. This is done on line [19]. No °
te''' '''the use of command WAIT on this line.''' 'do' °
'''THE COMMAND WAIT'',r' °
'''This command determines when and how long AP207 will wait while''' °
'''displaying the graphic window. If the right argument to WAIT is a'' °
' '''zero, the window will flash, and disappear immediately.''' 'do' °
'show ''wt╜0 ╪ T╜TESTFONT 0''' °
'''An integer will determine as we have already seen the length of tim °
e''' °
'''the screen will remain visible. A null string will cause the graphi °
c''' °
'''screen to wait until any key is pressed. In the next example do not °
''' °
'''click on the Session Manager window! Instead, just press any key.'' °
X' 'do' 'show ''wt╜∞0 ╪ T╜TESTFONT 0''' °
*(1996 8 6 21 13 10 296) °
FTEACH6 ÉFX 'TEACH6;M;T;D207' 'Σ The LINETYPE command' °
'''Command FONTDEF does not have any effect other than bringing the''' °
'''desired font into the workspace. It is command FONT that determines °
''' °
'''the nature of the actual display. Before we discuss the parameters °
of''' °
'''FONT, let us first look at the various fonts. (We will invoke the f °
irst''' °
'''element of the left argument of TESTFONT, which determines the heig °
ht''' '''of the displayed text).'',r' °
'''As you watch the 22 fonts being displayed on the screen, note the'' °
' °
'''string of characters, if any, following the words "APL symbols:"''' °
'''This string should contain the following symbols: αµ~╞ΩÉ⌠. Only the °
''' °
'''two fonts that support APL2 characters will display these symbols'' °
' '''These are fonts ROMSIM (14) and ROMSIMM (15).'',r' °
'''ATTENTION! DO NOT CLICK ON THE SESSION MANAGER SCREEN. VARIABLE wt' °
'' °
'''WILL BE SET TO 2 SECONDS BETWEEN CONSECUTIVE CHANGES OF THE VIEW''' °
'do' 'show ''wt╜2 ╪ T╜14 TESTFONT 0,∞22 ╪ T''' °
'''The listing of array T (returned by TESTFONT) gives the names of th °
e''' °
'''dispayed fonts followed by the font parameters. Note the "image''' °
'''height" value (the first number following the name DEFAULT). Its me °
aning''' '''is unknown to me.'',r' °
'''You may have noticed that the sixth font (MARKERS) contains the 19' °
'' °
'''markers. This font also contains the digits 0 to 9, but no other''' °
X '''characters.''' 'end' °
*(1996 8 6 21 17 19 348) °
FTEACH7 ÉFX 'TEACH7;T;F;N;D207' 'Σ Font parameters' °
'''PARAMETERS OF COMMAND FONT'',r' °
'''The parameters of command FONT specify the nature of the font, its' °
'' °
'''size orientation and other characteristics. We will illustrate thes °
e''' '''by invoking directly the shared variable D207'',r' °
'T╜207 SVOFFER ''D207''' °
'show ''D207╜''''OPEN''''(0 ''''FONTS'''' 760 560 0 0) ╪ T╜test''' °
'''Having opened the graphic window, we will now use command FONTDEF t °
o''' '''retrieve font ROMSIM'',r' °
'show ''F╜εfpath,(N╜''''ROMSIM''''),''''.AVF'''' ╪ DISPLAY N F''' °
'show ''D207╜''''FONTDEF''''(N F) ╪ T╜test''' °
'''Font ROMSIM is now defined in this workspace. However, it has not y °
et''' °
'''been activated. We can find out about the currently active font by' °
'' °
'''issuing command FONT with a null argument. (Incidentally, issuing'' °
' °
'''command FONTDEF with a null argument as suggested in the User''''s' °
'' '''Guide will produce a non zero return code.)''' 'do' °
'show ''D207╜''''font'''' '''''''' ╪ DISPLAY T╜test''' °
'''Command FONT '''''''' returns the DEFAULT font parameters. These wi °
ll''' °
'''remain active until a FONT command is issued changing them.'',r' °
'''NOTE: Since the default image font ignores the command FONT paramet °
ers,''' °
'''the first 8 numeric values of the list above are meaningless.''' °
'do' °
'''Let us look at the 12 numeric values that follow the string "DEFAUL °
T"''' 'do' °
'''The first 8 of these are parameters of command FONT. The last four °
give''' °
'''information about the location of the display. Here is the meaning °
of''' '''the first 8 components'',r' °
''' 1 Height of the font in pels'',r,'' 2 The conterclockwise angl °
e of text''' °
''' 3 Horizontal justification (0=left; 1=center; 2=right)''' °
''' 4 Vertical justification (0=baseline) admits values 1,2,3 or 4'' °
' °
''' 5 Direction (zero)'',r,'' 6 Angle of shear in degrees (0=verti °
cal)''' °
''' 7 Stretching in X-direction'',r,'' 8 No parse (zero)'',r' °
'''Two of these ("Direction" and "No parse") are reserved.''' 'do' °
'''The last 4 components give the default values of the text. For the' °
'' '''image font these numbers cannot be changed.'',r' °
''' 9 Box height'',r,'' 10 Descender height'',r,'' 11 Maximum font °
X width''' ''' 12 Font type (0=default; 1=AVF file font)''' 'end' °
*(1996 8 6 21 20 7 312) °
FTEACH8 ÉFX 'TEACH8;FR;T;D207' 'Σ The size FONT parameter' °
'''To study these 8 parameters we will again use function TESTFONT, bu °
t''' °
'''this time with left arguments. For each parameter we will display'' °
' '''the text two ways, once with default values, and once with the''' °
'''parameter under study set to a distinctive value. Note that in the' °
'' °
'''next example, if the left argument is a nested vector, the nested'' °
' °
'''components apply separately to each of the right argument. We have' °
'' °
'''already seen that the first component of command "FONT" determines' °
'' '''the height of text in pels (we set "wt" to null)'',r' °
'show ''wt╜∞0''' °
'''ATTENTION! In the following examples DO NOT click on the Session''' °
'''Manager screen. Since "wt" is a null vector, merely PRESS any key!' °
'' 'do' 'show ''T╜(,20) (,30) TESTFONT 7 7 ╪ DISPLAY T''' °
'''If the text is longer than fits the screen, there is a scissor like °
''' '''cut-off.'',r' °
'''Any attempt to change the size of the image font (0) will fail''' °
'do' 'show ''T╜(,20) (,40) TESTFONT 0 0''' °
'''We can also display the MARKER font in default and in small size''' °
'do' 'show ''T╜(∞0) (,2) TESTFONT 6 6''' °
'''We shall see in the next lesson that the MARKER command is not affe °
Xcted''' '''by any parameters of the command FONT.''' 'end' °
*(1996 8 1 14 18 58 460) °
FTEACH9 ÉFX 'TEACH9;FR;T;D207' 'Σ FONT angle, xjust, yjust' °
'''The second parameter of FONT determines the angle of the text''' °
'show ''wt╜2''' °
'show ''T╜(10 90) (10 25) (10 180) TESTFONT (7 50 100) 7 (7 500 100)'' °
' '''The returned values are in T''' 'do' 'show ''DISPLAY T''' °
'''The third numeric parameter of command FONT specifies the relative' °
'' °
'''location of the starting position with respect to the text. It admi °
ts''' '''three values'',r' °
''' 0 text is placed to the right of the starting position''' °
''' 1 text is centered at the staring position''' °
''' 2 text is placed to the left of starting position'',r' °
'''Here is an example of these three conditions. In all three cases,'' °
' '''the starting position {400 100} is the same''' 'do' °
'show ''T╜(8 0 0) (8 0 1) (8 0 2) TESTFONT 3µΓ(7 400 100)''' °
X 'TEACH9A' 'end' °
*(1996 8 1 14 25 25 356) °
FTEACH9A ÉFX 'TEACH9A;B;C;F;N;T;W;D207' 'Σ X-justification of FONTs' °
'''Where the third component of FONT can be used to X-justify the''' °
'''placement of text, the fourth component will Y-justify it.'',r' °
'''We will use the shared variable D207 to illustrate how this fourth' °
'' °
'''component can be used to create text with subscripts and superscrip °
ts'',r' 'T╜207 SVOFFER ''D207''' °
'show ''D207╜''''OPEN''''(0 ''''FONTS'''' 760 560 0 0) ╪ T╜test''' °
'''Having opened the graphic window, we will again use command FONTDEF °
''' '''to retrieve font ROMSIM'',r' °
'show ''F╜εfpath,(N╜''''ROMSIM''''),''''.AVF'''' ╪ D207╜''''FONTDEF''' °
' (N F)''' °
'''Next we will activate this font but only with the SIZE component, s °
o''' '''that we can compare the results.''' 'do' °
'show ''D207╜''''font'''' (''''ROMSIM'''' 20) ╪ T╜test''' °
'''We are now ready to illustrate how the fourth parameter works. This °
''' '''parameter will accept the values 0 1 2 3 and 4.'',r' °
'''ATTENTION! YOU WILL HAVE TO CLICK ON THE SESSION MANAGER TO RETURN °
TO APL2''' 'do' °
'show ''W╜200 300 ╪ D207╜''''move'''' W ''''write'''' ''''A'''' ''''vi °
ew'''' '''''''' ╪ T╜test''' 'D207╜''move'' '''' ╪ W╜(ΓW),1╟D207' °
'''Next we will write the letter B on the same line, but by setting th °
e''' '''fourth parameter to 1''' 'do' °
'show ''D207╜''''font'''' (''''ROMSIM'''' 20 0 0 1) ''''write'''' '''' °
B'''' ''''view'''' ''''''''''' 'D207╜''move'' '''' ╪ W╜W,1╟D207' °
'''Note two effects:''' °
''' 1 The letter "B" was written just to the right of the letter A. Th °
is''' °
''' because the "Current Position" has been changed to be to the rig °
ht''' ''' of the letter A''' °
''' 2 The letter B is slightly below the level of the letter A. This i °
s''' °
''' caused by the fourth parameter (a one) of the FONT command.'',r' °
'''We will now issue the FONT command with a 2''' 'do' °
'show ''D207╜''''font'''' (''''ROMSIM'''' 20 0 0 2) ''''write'''' '''' °
C'''' ''''view'''' ''''''''''' 'D207╜''move'' '''' ╪ W╜W,1╟D207' °
'''We continue in the same way invoking 3,4 and 0 using letters D E an °
d F''' 'do' °
'show ''D207╜''''font'''' (''''ROMSIM'''' 20 0 0 3) ''''write'''' '''' °
D'''' ''''view'''' ''''''''''' 'D207╜''move'' '''' ╪ W╜W,1╟D207' °
'show ''D207╜''''font'''' (''''ROMSIM'''' 20 0 0 4) ''''write'''' '''' °
E'''' ''''view'''' ''''''''''' 'D207╜''move'' '''' ╪ W╜W,1╟D207' °
'show ''D207╜''''font'''' (''''ROMSIM'''' 20 0 0 0) ''''write'''' '''' °
F'''' ''''view'''' ''''''''''' 'D207╜''move'' '''' ╪ W╜W,1╟D207' °
'''We can now summarize the behavior of the fourth numeric parameter i °
n''' '''command FONT:'',r' '''VALUE EFFECT''' °
''' 0 Default, Current position of X changed but Y unchanged''' °
''' 1 Text in subscript, X to the right of letter, Y to subscript °
level''' °
''' 2 Same as 1, but a subscript to the subscript level''' °
''' 3 Text in superscript, X same as before, Y to superscript leve °
l.''' ''' 4 Text on line below previous text'',r' °
'''We have saved the "Current positions" after each of these WRITE''' °
'''commands in variable W. Here are its contents'',r' °
X 'show ''DISPLAY πW''' °
*(1996 7 21 13 25 8 360) °
FTEST ÉFX 'U╜V TEST W;T;F;N' °
'Σ Test a sequence of graphic commands (W)' °
'T╜ÉSVR ''D207'' ╪ T╜207 SVOFFER ''D207''' °
'D207╜''open''(1 ''TEST'' 760 560 0 0)' '╕(0=ÉNC ''V'')/L1' °
'F╜εfpath,(N╜πfonts[|V]),''.AVF''' 'D207╜''FONTDEF''(N F) ╪ T╜test' °
'D207╜''font''(N 50) ╪ T╜test' 'L1:D207╜''move''(50 300) ╪ T╜test' °
'D207╜W ╪ U╜test' 'D207╜''view'' '''' ╪ T╜test' 'do' °
X 'T╜ÉSVR ''D207'' ╪ T╜ÉEX ''D207''' °
*(1996 7 31 14 7 17 368) °
FTESTFONT ÉFX 'U╜V TESTFONT W;B;F;H;L;M;N;O;S;T;D207' 'Σ Test fonts' °
'U╜''''' 'T╜(0=ÉNC ''V'')doif ''V╜,14''' 'T╜207 SVOFFER ''D207''' °
'D207╜''OPEN''(0 ''FONTS'' 760 560 0 0)' 'L0:O╜╞M╜╞W╜,W' 'H╜,V' °
'M╜2╞1╟M,50 300' °
'╕((0=O)doif ''N╜0'' ''L╜''''This is the default font '''''')/L1' °
'F╜εfpath,(N╜πfonts[|O]),''.AVF''' 'L╜''This is font '',N' °
'T╜(6=|O)doif ''L╜ÉAV''' 'D207╜''FONTDEF''(N F)' °
'L1:T╜(1<╧V)doif ''H╜1╙V''' 'S╜(ΓN),╞H' 'T╜(O=0)doif ''S╜0''' °
'L╜(«╞W),'' '',L,'' APL symbols: αµ~╞ΩÉ⌠''' °
'D207╜''CLEAR'' '''' ''VIEW'' ''''' °
'D207╜''MOVE'' M ''FONT'' S ''WRITE'' L ''WAIT'' wt' 'T╜test' °
'D207╜''FONT'' ''''' 'U╜U,T╜1╟D207' 'D207╜''FONTDEF''(N ²1)' °
'╕((0≤O)δW╧0)/L2' 'D207╜''move'' M ''MARKER'' M ''view'' ''''' 'do' °
X 'L2:V╜1ΦV' '╕(0<µW╜1╟W)/L0' 'U╜πU' °
*(1996 7 21 12 38 47 564) °
FTESTWRITE ÉFX 'U╜V TESTWRITE W;T;F' °
'Σ Test a sequence of graphic commands (W)' °
'T╜ÉSVR ''D207'' ╪ T╜207 SVOFFER ''D207''' °
'D207╜''open''(1 ''TEST'' 760 560 0 0) ╪ T╜test' °
'F╜fpath,''ROMSIM.AVF''' 'D207╜''fontdef''(''ROMSIM'' F) ╪ T╜test' °
'D207╜''font''(''ROMSIM'' 50) ╪ T╜test' °
'D207╜''move''(50 300)''write'' W ╪ U╜3 2πT╜test ╪ ╕(0=ÉNC ''V'')/L0' °
'D207╜''move'' U[1 2]''box''(4╞U[7 8]) ╪ T╜test' °
'D207╜''move'' '''' ╪ T╜test' °
'D207╜''marker'' 1 ╪ D207╜''marker'' U[1 2]' °
'D207╜''marker'' 2 ╪ D207╜''marker'' U[3 4]' °
'D207╜''marker'' 3 ╪ D207╜''marker'' U[5 6]' °
'D207╜''marker'' 4 ╪ D207╜''marker'' U[7 8]' °
'D207╜''marker'' 10 ╪ D207╜''marker''(50 300)' °
'L0:D207╜''view'' '''' ╪ T╜test' 'do' °
X 'T╜ÉSVR ''D207'' ╪ T╜ÉEX ''D207''' °
XCa 0 % °
*(1992 2 29 8 32 29 448) °
Faddquote ÉFX 'u╜addquote w' °
'Σ Put quotes around a string, and double existing quotes' °
X 'u╜ÉAV[40],((1+w=ÉAV[40])/w),ÉAV[40]' °
*(1992 2 29 8 32 29 448) °
XFaq ÉFX 'u╜aq w' 'Σ Enclose quoted string' 'u╜Γaddquote w' °
*(1992 2 29 8 32 30 452) °
Fav ÉFX 'av;a;n;i;ÉIO' 'Σ Display characters in the Atomic vector' °
'ÉIO╜0' 'a╜22 78µ'' ''' 'n╜3 0«φ12 22µ1+∞256' °
'a[;,(6⌡∞12)°.+2 3 4]╜n' 'a[;6+6⌡∞12]╜φ12 22µÉAV' °
X 'a[7 8 10 13;6]╜'' ''' 'a[14+∞8;68 69 70 72]╜'' ''' 'a' °
*(1992 2 29 8 32 32 460) °
Fback ÉFX 'back;T' 'Σ Reset screen to 25⌡80 size' 'OPEN 124' 'C124╜0 3' °
X 'CLOSE 124 206' °
*(1996 6 27 13 48 32 568) °
Fcopyright ÉFX 'copyright' 'Σ Copyright statement' °
'(10µ'' ''),''Copyright, Z. V. Jizba, 1995,1996'',r' °
'''To see disclaimers, enter ÉCR ''''copyright''''''' 'do' '╕0' °
'''This and subsequent workspaces labelled TEACHxx are made available' °
'' °
'''at no cost to anyone who desires to learn how to use effectively''' °
'''the IBM/OS2 version of APL2.'',r' °
'''This software is provided "AS IS" with no WARRANTY of any kind, eit °
her''' °
'''express or implied. Any risk in its use resides with you, the user °
Xof''' '''these tutorials.''' '''(PRESS ENTER to continue)''' °
XCd 0 " °
*(1992 2 29 8 32 33 464) °
Fdate ÉFX 'u╜date w' 'Σ Format date and time of day' 'u╜«6╞w' °
X 'u╜('' ''⌠u)Γu' 'u╜εu,■''-- .. ''' °
XCdig 1 10 1234567890 °
*(1992 2 29 8 32 28 444) °
Fdo ÉFX 'do;t;e;b' 'Σ Expression driver' 'e╜''''' 'æ╜'' ''' 't╜æ' °
'╕(^/'' ''=t)/0' °
'╕(('':''εt)doif ''b╜evaldd (+/^\'''' ''''=t)╟t'')/2' °
'''e╜ÉEM'' ÉEA t' '╕(0=µ,e)/2' °
'''This is not a valid APL2 expression''' 'æ╜''*''' '╕(''?''⌠╞1╟æ)/2' °
X 'e' '╕2' °
*(1992 2 29 8 32 28 444) °
Fdoif ÉFX 'U╢╜V╢ doif W╢;t╢' 'Σ Rule' '╕(^/~U╢╜V╢)/0' °
X '''U╢╜V╢ doif■ W╢'' ÉEA ''»V╢/W╢''' °
XNdos 0 ²26 °
XCe 1 0 °
*(1996 7 24 14 20 54 540) °
Fend ÉFX 'end' 'e╜''''' 'æ╜'' ''' 't╜æ' '╕(^/'' ''=t)/L0' °
'╕(('':''εt)doif ''b╜evaldd (+/^\'''' ''''=t)╟t'')/3' °
'''e╜ÉEM'' ÉEA t' '╕(0=µ,e)/L0' °
'''This is not a valid APL2 expression''' 'æ╜''*''' °
X '╕(''?''⌠╞1╟æ)/L0' 'e' 'L0:''²²''' °
*(1992 2 29 8 32 30 452) °
XFendd ÉFX 'endd' 'Σ End of document' '20µ''²''' 'do' °
*(1996 8 8 12 5 42 364) °
Ferase ÉFX 'erase;t;b;DISPLAY;DOS;GO;FRAME;NODIST;SVOFFER' 't╜ÉNL 3' °
't╜(~t^.εlc,'' '')≡t' 't╜(~(t[;∞5]^.=''TEACH'')δt[;∞4]^.=''TEST'')≡t' °
't╜ÉEX t' 't╜ÉNL 2' 't╜ÉEX(~t^.εlc,'' '')≡t' 't╜ÉNL 4' °
X 't╜ÉEX(~t^.εlc,'' '')≡t' °
*(1992 2 29 8 32 32 460) °
Fevaldd ÉFX 'u╜evaldd w;c;n' °
'Σ Evaluate a direct definition expression' 'u╜0' 'n╜(w∞''Σ'')-1' °
'c╜(((n╞w)⌠'':'')Γn╞w),Γ''ΣDD '',(n+1)╟w' '╕(label╞c)/0' °
'╕((2=µc)doif ''u╜showdd 1╙c'')/0' °
'╕((3=ÉNC╞c)doif ''u╜⌡µÉ╜(╞c),'''' is already defined.'''''')/0' °
'╕((3=µc)doif ''u╜simdd c'')/0' 'c╜(Γ''α∙ aw'')replace■c' °
'u╜ε''u╜'',((''a''εεc[2 3 4])/''a ''),(╞c),'' w;t;b''' °
'u╜u(5πc)(''b╜(t╜'',(3πc),'')/'',addquote ''u╜'',4πc)' °
X 'u╜u,''╕(t doif b)/0''(''u╜'',2πc)' 'u╜╧ÉFX u' °
*(1992 2 29 8 32 32 460) °
Fexit ÉFX 'exit w' 'Σ Exit if there are too many suspended functions' °
X '╕((10>µÉLC)doif ''w'')/0' '''Please re-enter '',w' '╕' °
XCf 1 2 { °
Afonts╜('GOTENG')('GOTGER')('GOTITA')('GRESER')('GRESIM')('MARKERS')('M °
ODSIM')('ROMDUP')('ROMDUPF')('ROMITA')('ROMITAB')('ROMSER')('ROMSERB')( °
'ROMSIM')('ROMSIMM')('SANSER')('SANSERF')('SCRIPT')('THKRNDF')('THKRNDO °
X')('THKSQUF')('THKSQUO') °
XCfpath 1 17 D:\APL2OS2\FONTS\ °
XCg 1 2 } °
*(1996 3 12 15 27 53 504) °
Fget ÉFX 'u╜v get w;t;ÉPR' 'Σ Prompt for response from keyboard' °
't╜(0=ÉNC ''v'')doif ''v╜1'' ╪ ÉPR╜''''' 'w╜w,(~²1╞v)/'': ''' °
'L0:æ╜w' 't╜æ' '╕((''╕''=(µw)╟t)doif ''╕'')/0' '╕(^/'' ''=w)/L1' °
'╕((~w╧(µw)╞t)doif ''''''PLEASE DO NOT BACKSPACE'''''')/L0' °
't╜(µw)╟t' 'L1:u╜(²1+(,'' ''⌠t)∞1)╟t' '╕(1╞v)/0' 't╜(u⌠'' '')Γu' °
X 'u╜(µt),(Γu),t' °
*(1992 10 18 10 45 51 584) °
Fgetfont ÉFX 'getfont W;N;F' 'Σ retrieve fonts W' 'W╜0,(Wε∞22)/W' °
'L0:╕(0=µW╜1╟W)/0' 'F╜εfpath,(N╜πfonts[╞W]),''.AVF''' °
X 'D207╜''FONTDEF''(N F)' '╕L0' °
*(1996 3 10 15 8 33 340) °
Fglobals ÉFX 'globals;T;D207' 'Σ Initialize useful global variables' °
'r╜2╙ÉTC' 'q╜40╙ÉAV' 's╜Φp╜'' '',d╜35╙ÉAV' °
'sv╜(100 211 80 206)(210 124)' 'uc╜''ABCDEFGHIJKLMNOPQRSTUVWXYZ''' °
'lc╜''abcdefghijklmnopqrstuvwxyz''' 'dig╜''1234567890''' °
'g╜Φ'' '',h╜126╙ÉAV' 'f╜ÉAV[33 124]' 'a╜38╙ÉAV' 'ul╜''²''' °
'T╜207 SVOFFER ''D207''' 'D207╜''QUERY'' ''''' 'modes╜,3πD207' °
'path╜''D:\APL2OS2\WORK\''' 'Σ''The current path is '',path' °
'ΣT╜1 get ''Enter new path if incorrect, else press Enter: ''' °
'Σ╕((0<µT)doif ''path╜T'')/0' 'fpath╜''D:\APL2OS2\FONTS\''' °
'''For this lesson you must specify a path to the FONT files.''' °
'''The current path is '',fpath' °
'T╜1 get ''Enter new path if incorrect, else press Enter: ''' °
X '╕((0<µT)doif ''fpath╜T'')/0' °
XCh 0 } °
*(1992 8 10 10 44 11 380) °
Findex ÉFX 'U╜V index W;A;C;H;I;T' 'Σ List contents of an AP 211 file' °
'T╜~(1<╧W)doif ''H╜2πW'' ''W╜1πW''' 'T╜T doif ''H╜''''FUNCTION''''''' °
'T╜(ΓW)ε''DOCS'' ''UTILITY'' ''HELP'' ''TUTOR''' °
'T╜T doif ''W╜path,W,''''.211''''''' '1 OPEN 211' 'D211╜''USE'' W' °
'''File '',W,'' has record length='',1╟D211' °
'D211╜''LIST'' ''NAMES''' 'U╜D211' °
'╕((0=╧U)doif ''U╜''''Unknown file'''''')/0' 'C╜1╟µU╜U[I╜ÉAV√U;]' °
'╕((0=ÉNC ''V'')doif ''CLOSE 211'')/0' 'U╜(C╞H),[1]ul,[1]U' °
'╕((0=1╞V)doif ''U╜0 0 2 tab U'' ''CLOSE 211'')/0' °
'D211╜''LIST'' ''ATTS''' 'A╜D211' °
'A╜(''SZ'' ''ID'' ''DATE'' ''mo'' ''d'' ''TIME'' ''m'' ''s'' ''ms''),[ °
1]ul,[1]A[I;]' 'V╜(Vε0,(∞9),-∞9)/V' 'U╜U,«A[;(0⌠V)/|V]' °
'╕((0εV)doif ''CLOSE 211'')/0' °
'T╜~(0<╛/V)doif ''U╜U[∞2;],[1](2 0╟U)[√(2 0╟A)[;|V];]''' °
'T╜T doif ''U╜U[∞2;],[1](2 0╟U)[ⁿ(2 0╟A)[;|V];]''' 'T╜ÉDL 1' °
X 'CLOSE 211' °
*(1996 3 10 14 58 1 408) °
Finitialize ÉFX 'initialize;t;C2' °
'Σ Initialize workspace. (To add to "sv" keep 100 FIRST)' 'erase' °
X 'globals' °
*(1992 2 29 8 32 29 448) °
Fkeys ÉFX 'keys' 'Σ Display keyboard' °
''' 1 2 3 4 5 6 7 8 9 0 + ⌡''' °
'''SHFT ╒ ■ ² < ≤ = ≥ > ⌠ δ ^ - ÷''' °
'''ALT ╘ ƒ · ⁿ √ Φ φ Θ ╡ τ σ ! Æ''' '''''' °
''' Q W E R T Y U I O P ╜ ╙ ╧''' °
'''SHFT ? ∙ ε µ ~ ╞ ╟ ∞ Ω * ╕ ╨ ╤''' °
'''ALT q w e r t y u i o p æ ≈ ╥''' °
'''CTRL ┌ ┬ ┐ ╔ ╦ ╗''' '''''' °
''' A S D F G H J K L [ ]''' °
'''SHFT α ⌐ ╛ _ ╖ ╢ ° '''' É ( )''' °
'''ALT a s d f g h j k l » «''' °
'''CTRL ├ ┼ ┤ ─ ═ ╠ ╬ ╣''' '''''' °
''' Z X C V B N M , . /''' °
'''SHFT Γ π ∩ ¼ ¥ ÿ | ; : \''' °
'''ALT z x c v b n m Σ ± ≡''' °
'''CTRL └ ┴ ┘ │ ║ ╚ ╩ ╝''' '''''' °
X '''Toggle switch to ASCII is CTL-BACKSPACE''' '''CTRL+G gives beep''' °
*(1992 2 29 8 32 32 460) °
Flabel ÉFX 'u╜label w' °
'Σ Return 1 if w is not a valid character string label (also excludes °
Xl.c.)' '╕(u╜(1<µµw)δ1<╧w)/0' '╕(u╜~^/wεlc,uc,dig)/0' 'u╜w[1]εlc,dig' °
XClc 1 26 abcdefghijklmnopqrstuvwxyz °
XNmodes 1 10 1 800 600 65536 8 256 19 10 2826 2830 °
*(1992 2 29 8 32 33 464) °
Fnon ÉFX 'non;t;rc;et;r' °
'Σ Ignore invalid keyboard entries, but evaluate valid APL2 expression °
s' 'æ╜'' ''' 't╜æ' '╕(0=µ(t⌠'' '')/t)/0' '(rc et r)╜ÉEC t' °
X '╕(0=rc)/2' '╕((1=rc)doif ''r'')/2' '╕2' °
*(1992 2 29 8 32 32 460) °
Fnotb ÉFX 'u╜notb w' 'Σ Remove trailing blanks' °
'╕((1<╧w)doif ''u╜notb■ w'')/0' '╕((1<µµw)doif ''u╜πnotb Γ[2]w'')/0' °
X 'u╜(1-(,'' ''⌠Φw)∞1)╟w' °
*(1992 10 18 10 45 17 448) °
Fopenmode ÉFX 'openmode W' 'Σ Open graphic screen in mode W' °
X 'T╜207 ÉSVO ''D207''' '╕(2⌠ÉSVO ''D207'')/0' 'D207╜''OPEN'' W' °
XCp 1 2 " °
XCpath 1 16 D:\APL2OS2\WORK\ °
*(1992 2 29 8 32 33 464) °
Fpause ÉFX 'v pause w;t' °
'Σ Pause, then print w v spaces right and return' °
X 't╜(0=ÉNC ''v'')doif ''v╜6''' 'do' '(vµ'' ''),w' 'do' °
*(1992 7 16 11 12 35 372) °
Fprint ÉFX 'print W;L;D80' 'Σ Print function W on an Epsom printer' °
'╕((~(ÉNC W)ε3 4)doif ''''''This is not a function or defined operator °
X'''''')/0' 'OPEN 80' 'D80╜5' 'L╜,showfn W' 'D80╜π(L⌠r)ΓL' 'CLOSE 80' °
XCq 0 ' °
XCr 0 °
*(1992 2 29 8 32 32 460) °
Freplace ÉFX 'u╜v replace w;i;r;s' 'Σ Replace elements in v in w' °
'i╜Γ∞µu╜w' 's╜2πv╜(v⌠'' '')Γv' 'i╜⌡r╜i⌡■Γ[1]w°.=╞v' °
X 'u[(εi)/εr]╜s[(εi)/εi⌡■∞µs]' °
*(1992 2 29 8 32 38 484) °
Freset ÉFX 'reset' 'Σ Reset parameters to initial screen' °
'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 °
X 1 0''' °
*(1992 2 29 8 32 33 464) °
Fround ÉFX 'u╜v round w' 'Σ Half adjust w to vth decimal' °
X 'u╜(╛0.5+w⌡10*v)÷10*v' °
XCs 1 2 " °
*(1992 8 10 10 58 49 588) °
Fshared ÉFX 'U╜shared;T;C2;D2;E2' °
'Σ List all shared variables currently active' °
'T╜2 ÉSVO■''C2'' ''D2'' ''E2''' °
'╕((δ/2⌠T╜ÉSVO■''C2'' ''D2'' ''E2'')doif ''''''AP 2 not active'''''')/ °
X0' 'C2╜0' 'U╜D2[;4]' 'U╜((εsv)εU)/εsv' °
*(1992 2 29 8 32 33 464) °
Fshow ÉFX '╢v show ╢w;╢t;╢b' 'Σ Display and execute ╢w' °
'╢t╜(0=ÉNC ''╢v'')doif ''╢v╜0''' °
'╕((0=╧╢w)doif ''show ╢w,'''' '''''')/0' °
'╕((1<╧╢w)doif ''╢v show■ ╢w'')/0' ''' '',╢w' °
X '╕((╢v^'':''ε╢w)doif ''╢t╜evaldd ╢w'')/L0' '''ÉEM'' ÉEA ╢w' 'L0:do' °
*(1992 2 29 8 32 33 464) °
Fshowdd ÉFX 'u╜showdd w;a;b;c;r' °
'Σ Display a direct definition function' °
'╕((1=╧w)doif ''u╜showdd Γw'')/u╜0' °
'╕((3⌠ÉNC╞w)doif ''(ε╞w),'''' is not a function'''''')/0' °
'c╜Γ[2]ÉCR╞w' 'c╜notb(2╞c),(Γ''aw α∙'')replace■2╟c' °
'╕((~''ΣDD''╧3╞2πc)doif ''''''Not a direct definition function'''''')/ °
0' 'u╜1' 'b╜('' ''⌠╞c)Γ╞c' 'a╜'' ''' 'r╜2╟3πc' °
'╕((3=µc)doif ''a,(╞w),'''':'''',r,(3<µ2πc)/'''' Σ'''',3╟2πc'')/0' °
'a╜a,(╞w),'':'',(2╟5πc),'':''' 'b╜(+\r=''('')-+\r='')''' 'b╜b∞0' °
X 'a╜a,(²3╟(b-1)╞3╟r),'':'',2╟»(b+2)╟r' 'a,(3<µ2πc)/'' Σ'',3╟2πc' °
*(1992 9 6 10 33 13 332) °
Fshowfn ÉFX 'u╜v showfn w;f;n;t;ÉIO' 'Σ Simulate the STSC ÉVR command' °
't╜(0=ÉNC ''v'')doif ''v╜,0''' 'ÉIO╜0' °
'u╜'' '',''╖'',w,''[É]'',(╞v)╞''╖''' 'n╜1╞µf╜ÉCR w' °
'v╜v[0],((1╟v)ε∞n)/1╟v' 'n╜«∞n' 'n╜(n⌠'' '')Γn' °
'f╜(π''['',■n,■Γ''] ''),f' °
't╜(1<µ,v)doif ''f╜f[1╟v;]'' ''u╜''''''''''' 'u╜²1╟u,r,,f,r' °
X 'u╜((-+/^\'' ''=Φu)╟u),('' ''(r,'' ╖'',date 2 ÉAT w))[╞v]' °
*(1992 9 13 10 41 2 348) °
Fshowg ÉFX 'v╢ showg ╢w;╢t;╢b' 'Σ Display and execute ╢w' °
'╢t╜(0=ÉNC ''╢v'')doif ''╢v╜0''' °
'╕((0=╧╢w)doif ''╢v showg ╢w,'''' '''''')/0' °
'╕((1<╧╢w)doif ''╢v showg■ ╢w'')/0' ''' '',╢w' °
X 't╢╜v╢ doif ''do''' '''ÉEM'' ÉEA ╢w' '╢w,r' °
*(1992 2 29 8 32 33 464) °
Fsimdd ÉFX 'u╜simdd w;e' 'Σ Simple direct definition mode' 'u╜0' °
'╕((0⌠ÉNC╞w)doif ''''''Already defined'''''')/0' 'e╜''α''ε2πw' °
'w[2]╜Γ''u╜'',''α∙ aw'' replace 2πw' 'w╜w[1 3 2]' °
X 'w[1]╜Γε''u╜'',(e/''a ''),w[1],'' w''' 'u╜╧ÉFX w' °
XAsv╜(100 211 80 206)(210 124) °
XCt 1 7 °
*(1992 6 3 9 59 17 424) °
Ftab ÉFX 'U╜V tab W;T;A;B;C;D;E;F;G;M;ÉPW' 'Σ Tabulate list W' °
'T╜(0=ÉNC ''V'')doif ''V╜0''' 'M╜''Invalid data for tabulation''' °
'V╜4╞V' 'ÉPW╜130╛30⌐G╜V[2]+79⌡V[2]=0' °
'L1:╕((1<╧W)doif ''''''W╜∞0'''' ÉEA ''''W╜πW'''''')/L1' °
'╕(((0=µεW)δ2<µµW)doif ''U╜(~V╧4╞0)/M'')/0' °
'T╜(1≥µµU╜«W)doif ''U╜πW╜(U⌠'''' '''')ΓU''' °
'T╜(0<V[1])doif ''U╜(«(Φ1,╞µW)µ(V[3]µ'''' ''''),∞(╞µW)-V[3]),'''' '''' °
,U''' '╕(G<30)/0' 'T╜(F╜µεV[4])+C╜1╟B╜µA╜(V[3],0)╟U' °
'T╜⌐(1╞B)÷1⌐╛(ÉPW+F)÷T' 'U╜(E╜(V[3],C)╞U),[1](B╜T,1╟B)╞A' °
'''D╜εV[4]'' ÉEA ''D╜ÉAV[εV[4]+33⌡V[4]=0]''' 'L0:A╜(T,0)╟A' °
X '╕(0=1╞µA)/0' 'U╜U,(((T+V[3]),µD)µD),E,[1]B╞A' '╕L0' °
*(1996 7 19 13 48 24 508) °
Ftest ÉFX 'U╜test' 'Σ test return code' '╕(0=╞╞U╜D207)/0' °
X '''SESSION ABORTED: The return code is '',╞U ╪ DISPLAYπU ╪ ╕' °
*(1992 9 5 9 10 34 316) °
Ftestap ÉFX 'U╜testap W;B;D;S;T' °
'Σ Test for existence of specific AP"s' 'D╜''D'',■«■W╜,W' °
'T╜W ÉSVO■D' 'U╜0' '╕((^/B╜2=ÉSVO■D)doif ''T╜ÉEX■ D'')/0' °
'T╜''The following Auxilliary Processor'',(S╜1<+/~B)╞''s''' °
'T,(ε(S+1)╙'' is'' '' are''),'' not available'',(~B)/W' 'U╜1' °
X 'T╜ÉEX■D' °
XCuc 1 26 ABCDEFGHIJKLMNOPQRSTUVWXYZ °
XCul 0 ² °
*(1996 6 13 13 16 24 352) °
Fwarna ÉFX 'warna;T' 'Σ clear AP124 and explai' °
X 'T╜ÉSVR■''C124'' ''D124''' 'T╜ÉEX■''C124'' ''D124''' °
*(1996 8 6 20 53 38 564) °
Fwarnb ÉFX 'warnb;T' 'Σ clear AP124 and explain' °
'''In the previous lesson we used the command VIEW. In this and in''' °
'''subsequent lessons this command will be invoked in the examples.''' °
'do' °
'''WARNING: THE RIGHT ARGUMENT TO "VIEW" WILL VARY IN THE EXAMPLES.''' °
'''WAIT A FEW SECONDS EACH TIME A GRAPHICAL SCREEN APPEARS. IF IT''' °
'''STAYS, TRY PRESSING ANY KEY. IF THIS ALSO HAS NO EFFECT, THEN AND'' °
X' '''ONLY THEN YOU MAY CLICK ON THE SESSION MANAGER SCREEN.''' 'do' °
*(1996 8 6 20 48 49 588) °
Fwarning ÉFX 'warning;T' 'Σ clear AP207 and explain' 'warna' 'warnb' °
'''As in the previous lesson the function "test" is used to verify''' °
X '''that a command given to AP207 was successful.''' 'end' °
XNwr 0 0 °
XNwt 0 2 °