home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
teachapl.zip
/
APL2OS2T.ZIP
/
TEACH41.ATF
next >
Wrap
Text File
|
1996-04-03
|
82KB
|
1,005 lines
XNÉIO 0 1 °
XNÉCT 0 1.000000000000011E²13 °
XCÉFC 1 6 .,*0_² °
XNÉRL 0 16807 °
XCÉPR 0 °
XCÉLX 1 5 TEACH °
*(1991 11 11 8 25 10 304) °
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' °
*(1991 11 11 8 25 12 312) °
FGO ÉFX 'GO;b;e;t' 'Σ Expression driver' 'L0:b╜e╜''''' 'æ╜'' ''' °
't╜æ' '╕(^/'' ''=t)/L0' '╕((^/'')OFF ''=5╞6╟t)doif ''exit'')/0' °
'╕(('':''εt)doif ''b╜evaldd (+/^\'''' ''''=t)╟t'')/L0' °
'''e╜ÉEM'' ÉEA t' '╕(0=µ,e)/L0' '╕b/L0' °
'''This is not a valid APL2 expression''' 'æ╜''*''' °
X '╕(''?''⌠╞1╟æ)/L0' 'e' '╕L0' °
*(1995 6 28 13 23 19 416) °
XFLOOP ÉFX 'LOOP' '''LOOPING'',ÉDL 1' '╕1' °
*(1995 7 18 13 40 35 512) °
FSCROLL ÉFX 'SCROLL;T' 'This line displayed every second' 'T╜ÉDL 1' °
X '╕1' °
*(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' °
AT╜4 4µ('t')('e')('s')('t')(2)(' ')(' ')(' ')('o')('n')('e')(' ')(3)(' °
X')(' ')(' ') °
*(1996 3 29 15 54 22 556) °
FTEACH ÉFX 'TEACH' 'Σ Introduction to APL2OS2 tutorials' 'copyright' °
'welcome' 'do' 'exa' 'TEACH1 Σ Installing APL2OS2' °
'TEACH2 Σ Defining libraries and APL2 invocation' °
'TEACH3 Σ The SESSION LOG' 'TEACH4 Σ The SESSION editor' °
'TEACH5 Σ Opening and APL2 object' °
'TEACH6 Σ The SIGNALS menu' 'TEACH7 Σ The OPTIONS menu' °
'TEACH8 Σ Customizing the keyboard' °
'TEACH9 Σ Setting up fonts' 'TEACH10 Σ Changing colors' °
'TEACH11 Σ Changing colors of fields' °
'TEACH12 Σ Setting up F-keys' °
X 'TEACH13 Σ The WINDOW and HELP menus' °
*(1996 3 29 16 14 17 380) °
FTEACH1 ÉFX 'TEACH1' 'Σ Installing APL2OS2' '''INSTALLING APL2OS2'',r' °
'''When you install APL2OS2, your desktop acquires a new icon. It is'' °
' °
'''the one that shows a globe with a highway paved with APL2 boxes.''' °
'''Clicking on this icon reveals a window containing additional icons. °
'',r' °
'''You may try out the "READ ME", "SERVICE INFO" icons for an up to da °
te''' °
'''status of your installed product. The "USER''''S GUIDE" icon provid °
es''' °
'''the entry to the on line version of the User''''s Guide manual. Sin °
ce''' °
'''you most likely have an updated version of APL2OS2, this on-line''' °
'''manual contains corrections and additions not in your hard copy. It °
''' °
'''is therefore highly recommended that you access this on-line docume °
nt''' °
'''for the most up-to-date information. The same thing can be said for °
''' °
'''the icons that represent entries to the "LANGUAGE REFERENCE" and th °
e''' '''"GRAPHPAK: USER''''S GUIDE AND REFERENCE.'',r' °
'''HINT: Click on the "User''''s Guide" icon. Then move the window to °
the''' °
''' right edge of your screen. Do the same thing for the "Languag °
e''' °
''' Reference" icon and the "Graphpack:..." icon. Then, click on °
the''' °
''' red APL2/2 icon to activate APL2. This will overlay the APL2' °
'' °
''' Session Manager window on your screen. As you use APL2, you c °
an''' °
''' always find answers to your APL2 questions by clicking on the °
''' ''' manuals-windows at the right edge of your screen.''' 'do' °
'''The bright red APL2/2 icon is your entry into APL2. Clicking on thi °
s''' °
'''icon invokes a batch file named APL2.CMD which resides in the sub-' °
'' '''directory BIN of APL2OS2 (the main directory for APL2OS2).'',r' °
'''At this point you are ready to start using APL2. However, you may'' °
' °
'''wish to define your own libraries, and change some of the default'' °
' '''parameters.''' 'do' '''ADDING LIBRARIES'',r' °
'''To add libraries, you will have to modify the APL2.CMD file.''' °
'''Here is the step by step procedure for customizing your APL2/2:''' °
''' 1. Click on the small square in the upper right hand corner of yo °
ur''' °
''' APL2 Session Manager window. This will "minimize " it i.e. it' °
'' °
''' will make it disapear from the screen but still keep it active °
.''' °
''' 2. Double click on the OS/2 System Editor icon on your desktop.'' °
' °
''' (You may have to move windows around to make this icon visible °
)''' ''' 3. Click on the FILE pull down menu, and select OPEN''' °
''' 4. In the Directory box double click on C:(or D:...) where APL re °
sides''' ''' 5. In the same box double click on APL2OS2''' °
''' 5. Again in the same column, double click on BIN''' °
''' 7. Now look in the FILE box for APL2.CMD and click on that. Your' °
'' °
''' Sytem Editor box will display the contents of that file. It wi °
ll''' °
''' look like the listing on page 11 of your User''''s Guide.''' °
''' | If you want to find a listing of APL2.CMD from your on-line °
|''' °
''' | "User''''s Guide", click on the Guide window. Then select the °
|''' °
''' | + sign on the item "Installing and Customizing APL2/2". Then °
|''' °
''' | select the "Customizing APL2/2" box, then "APL2.CMD" box, °
|''' °
''' | and finally select "Rexx Command File". °
|''' ''' 8. At this point you are ready to modify this file'',r' 'do' °
''' To illustrate the process, assume that you have a directory in''' °
''' C:\MINE that contains some of your APL2 workspaces. You would like °
X''' ''' to define this directory as LIB 12.''' 'end' °
*(1996 3 28 16 47 13 492) °
FTEACH10 ÉFX 'TEACH10' 'Σ The color palette' '''CHANGING COLORS'',r' °
'''You can change both background colors, and the colors of the APL''' °
'''fields. Changing the background color is easy:'',r' °
'''From the Options menu, select the "Color Palette". A window will''' °
'''appear with 9 rows and 13 columns of colors. Place the pointer on'' °
' °
'''the color you wish to have in the background. Press the right mouse °
''' °
'''button, and drag it to any spot on the Session Manager window. (A'' °
' °
'''paint bucket will appear as the prompt). When you release the mouse °
''' °
'''button, the background color will change. In the same way you can a °
lso''' '''change the color of the other window components.''' 'do' °
'''If you do not find a color to your liking on the color palette, you °
''' '''can design your own color:''' °
'''1. Point to the color that most closely approaches the one you want °
,''' °
''' and click the left button. A box will surround the color sample. °
''' °
'''2. Click on the "Edit color" button. A new window will appear on th °
e''' ''' screen.''' °
'''3. Move this window to one side so that both the "Color palette" an °
d''' ''' the "Edit color" window appear side by side.''' °
'''4. Using the mouse, move the cross-hairs on the color circle and on °
''' °
''' releasing the button, observe the effect on the selected color o °
f''' ''' the color palette.''' °
'''5. Again, using the mouse, move the brightness bar to see the effec °
t.''' °
'''6. When satisfied with the color, close the "Edit color" window.''' °
X 'end' °
*(1996 4 3 14 2 56 380) °
FTEACH11 ÉFX 'TEACH11' 'Σ Changing colors of the fields' °
'''CHANGING COLORS OF THE FIELDS'',r' °
'''When you select the "Fields..." option, a window named "Fields" com °
es''' °
'''up on the screen. The window gives instructions on how to change''' °
'''the colors of different APL2 fields. Below the instructions it list °
s''' °
'''the types of fields using the default color scheme: Some fields are °
''' '''blue, some black, and two are red.''' 'do' °
'''If you try to follow the instructions, you will quickly find that s °
imply''' °
'''clicking on the two needed options (Color Palette and Fields) does °
not''' °
'''produce the desired effect, namely to have the two windows side by °
side.''' °
'''Although there may be other ways to change the color of fields, her °
e is''' '''one approach that works:'',r' °
'''1. Select the "Color Palette" option. and then minimize it''' °
'''2. Select the "Fields..." option''' °
'''3. Click on the "Window list" (the easiest way is to press Ctrl and °
''' ''' Esc at the same time)''' °
'''4. Double click on the "APL2 Color Palette". Then move the two wind °
ows''' ''' so that they do not overlay each other.''' °
'''5. Select the color from the color palette, and pressing the Ctl ke °
y''' °
''' to drag the color to the desired Field on the "Filelds..." windo °
Xw.''' 'end' °
*(1996 3 28 16 47 54 656) °
FTEACH12 ÉFX 'TEACH12;SCROLL;T' 'Σ Setting up F-keys' °
'''SETTING UP F-KEYS'',r' °
'''Function keys are used in APL2OS2 in many contexts. A complete''' °
'''discussion of their usage must be delayed until such time we cover' °
'' '''the various Auxilliary Processors.'',r' °
'''However, as long as one deals only with the Session Manager, and''' °
'''the related "Options" pull down menu, there is a way to define F-ke °
ys''' °
'''with the objective of saving typing effort. On installation, APL2OS °
2''' °
'''defines a default for the first 12 F-keys. To find out what these'' °
' °
'''defaults are, simply select the "F-keys..." option. The "F keys"''' °
'''widow displays the current meaning of the 12 F-keys. A button in''' °
'''front of each definition provides for a check mark. A check mark''' °
'''will cause the definition to be displayed on the screen, but not to °
''' °
'''be evaluated. A definition without the checkmark will be immediatel °
y''' '''evaluated.''' 'do' °
'''To change a definition, mark the desired F-key line and enter the n °
ew''' °
'''definition. To place (or remove) a check mark, simply click on the' °
'' '''button. Pressing OK will complete the definition process.''' °
'do' °
'T╜ÉFX ''SCROLL;T'' ''''''This line displayed every second'''''' ''T╜É °
DL 1'' ''╕1''' '''SCROLL and DISPLAY STACK'',r' °
'''The last two items on the "Options..." pull down menu are toggle''' °
'''switches. To see how checkmarks affect the action of APL2, enter:'' °
,r' ''' SCROLL'',r' °
'''and wait until the listing goes to the bottom of the window. Then'' °
' °
'''press BREAK, and display the stack ")SI". Repeat this exercise for' °
'' °
'''different combinations of the "Scroll" and "Display stack" options. °
X''' 'end' °
*(1996 4 3 14 7 26 280) °
FTEACH13 ÉFX 'TEACH13' 'Σ The Windows and Help pull down menus' °
'''THE WINDOW and HELP MENUS'',r' °
'''The last two pull down menus (WINDOW and HELP) are of not much use. °
''' °
'''The "Windows" menu contains only one option: the "APL2 Window list" °
.''' °
'''When selected, it will display ONLY the currently active APL2 objec °
ts.''' '''To see a list of ALL OS/2 objects, press Ctrl AND Esc'',r' °
'''The "Help" pull down menu DOES NOT provide the APL2 documentation.' °
'' °
'''There are five items on this pull down menu, none particularly usef °
ul:''' °
''' HELP INDEX lists an outline of the OS/2 features associated with a °
''' °
''' window, editing text and pull down menus (most of it ha °
s''' ''' been covered by this lesson).''' °
''' GENERAL HELP describes the behavior of the APL2OS2 window.''' °
''' USING HELP describes how to access the OS/2 documentation.''' °
''' KEYS HELP lists the usage of key combinations to produce specific' °
'' ''' effects (as an alternate to the use of the mouse).''' °
''' PRODUCT INFORMATION is just an expanded copyright note'',r' °
'''If you need help in the use of APL2, you can follow the procedure'' °
' '''described earlier in this lesson:'',r' °
''' 1. minimize the Session Manager"''' °
''' 2. Open the User''''s Guide or the Language Reference icons and mo °
ve''' °
''' these windows to the right edge, where they will be visible fro °
m''' ''' the Session Manager.''' °
''' 3. Get back to the Session Manager.''' 'do' °
'''This completes the first tutorial lesson on using APL2OS2. Future'' °
' °
'''lessons will discuss some of the Auxilliary Processors and their us °
Xage''' '''in developping new applications.''' 'end' °
*(1996 3 29 16 15 44 492) °
FTEACH2 ÉFX 'TEACH2' 'Σ Defining new libraries' °
'''Move the pointer to the end of a line, say the one that reads''' °
'''SET APL00002=C:... and press ENTER. A blank line will appear below. °
''' '''On this new line type:'',r' '''SET APL00012=C:\MINE'',r' °
'''(You may wish to enter more library numbers in this manner, provide °
d''' °
'''the named directories already exist.) At this time you may also wis °
h''' °
'''to review the list of Environment variables (p. 17 of User''''s Gui °
de).''' °
'''However, unless there is a specific need, the default values should °
be''' °
'''adequate. Then, when you have finished, click on the FILE pull down °
''' '''menu, press SAVE and exit from the System Editor.'',r' °
'''To get back to APL2, click on the "Window list" button; then double °
''' °
'''click on the APL2 Session Manager line. Remember that your newly''' °
'''defined libraries (such as 12) will not become active until the nex °
t''' '''time you load APL2OS2.''' 'do' '''APL2 INVOCATION'',r' °
'''You may also wish to modify the invocation by adding keywords to th °
e''' °
'''"AOSAPL2.EXE" command (next to the last line of APL2OS2.CMD).There °
is,''' °
'''however, another way to introduce parameters to AOSAPL2.EXE. If you °
''' °
'''plan to invoke APL2 by double clicking on the red APL2 icon, you ca °
n''' °
'''modify the way it invokes APL2. The procedure is quite simple, but' °
'' '''again, requires a number of steps:'',r' °
'''Look over pages 15-16 of your User''''s Guide. Let us assume that y °
ou''' °
'''have decided to always use the "-ws 2m,7m" option to specify your'' °
' °
'''workspace size. You may also wish to provide for an optional entry °
of''' '''one or more additional keywords. Here is how to proceed:''' °
'do' °
''' 1. As before, minimize the APL2 Session Manager by clicking on th °
e''' ''' small square in the upper right corner''' °
''' 2. Point to the red APL2 icon, and click on the RIGHT button. A p °
ull''' ''' down menu will appear.''' °
''' 3. Select the line that reads SETTINGS. This will produce the fir °
st''' °
''' of several pages defining the manner in which APL2 will behave °
''' °
''' 4. The first page has three boxes. Ignore the one labelled Pathna °
me.''' °
''' Move the pointer to the one labelled Optional Parameters and'' °
' ''' click on it. Then enter: -ws 2m,7m []''' °
''' (ws -2m,7m will give you initially a WS size of 2 megs, and w °
hen''' °
''' that gets full will increment it by 7 megs. The brackets [] w °
ill''' °
''' cause a small window to appear each time you start APL2, wher °
e''' °
''' you will be able to enter additional invocation parameters.)' °
'' °
''' 5. Double click on the upper left corner to close the SETTINGS bo °
Xx''' 'end' °
*(1996 3 29 15 48 32 572) °
FTEACH3 ÉFX 'TEACH3' 'Σ Associated Windows' °
'''Now that you have initialized APL2 on your system, let us take a lo °
ok''' °
'''at the OS2 environment. Your APL2 Session Manager has the following °
''' '''labels on the pull-down menu list:'',r' °
''' Log'',r,'' Edit'',r,'' Signals'',r,'' Options'',r,'' Windows' °
',r,'' Help''' 'do' '''THE SESSION LOG'',r' °
'''You will note that the title of the APL2 window is "APL2 Session''' °
'''Manager". This window is a partial view of a file called the Sessio °
n''' °
'''log. (The actual file name is not important now). You can scroll''' °
'''the screen, change its size, move it around, and "minimize" it.''' °
'''When you click on the "Log" pull-down menu, you will see a list of' °
'' '''options dealing with your APL2 SESSION.'',r' °
'''There are three parts to this list. The first part deals with the'' °
' °
'''Session log file(s). You can save this file, rename it, erase it,'' °
' '''change its size and delete portions of it.'',r' °
'''The second portion of the "Log" pop up menu provides a way to quit' °
'' '''APL2. It is equivalent to the )OFF System Command.'',r' °
'''The last portion of the "Log" pull-down menu allows you to print al °
l''' °
'''or parts of the session. The "Print Setup..." gives you the ability °
''' °
'''to select the printer. The third option wil print the entire conten °
ts''' °
'''of the Session log. (Not recommended if your Session file is large) °
''' °
''' It is the second option, however, that may be most useful. It allo °
ws''' '''you to print selected portions of the log.''' 'do' °
'''Before we leave this section, consider trying the following exercis °
Xe:''' 'testlog' 'end' °
*(1996 3 28 16 48 49 640) °
FTEACH4 ÉFX 'TEACH4' '''SESSION EDITOR'',r' °
'''When you click on the "Edit" pull-down menu, only three of the 7''' °
'''options are highlighted:'',r' °
'''Paste'',r,''Find'',r,''Open Object...'',r' °
'''You will also notice that the seven options fall into four separate °
''' '''partitions:'',r' ''' Copy''' °
''' Cut Paste Find Open Object...''' °
''' Delete Marked''' ''' Unmark all'',r' °
'''Obviously in order to "Cut" "Copy" "Delete" or "Unmark" blocks of'' °
' '''data, one has to first mark it.''' 'do' °
'''There are two ways of marking lines:''' °
''' 1) Place the mouse at the line to be marked, then press the left'' °
' °
''' button and move the mouse to the left or right. The line will'' °
' °
''' become highlighted. If the mouse is also moved up or down, a''' °
''' block of lines may be so highlighted. Marked blocks need not''' °
''' be continuous. Marking an already highlighted line or block wil °
l''' ''' "unmark" it.''' °
''' 2) Another way to mark lines is to place the cursor on the line''' °
''' BELOW (or ABOVE) the line to be marked, and by pressing the SHI °
FT''' ''' and the UP or DOWN arrow.'',r' °
'''Once text or APL expressions have been highlighted, they can be''' °
'''erased or copied. To see how this works, try the following exercise °
:''' 'tested' °
'''The "Find" option on the Edit menu allows you to search for specifi °
c''' °
'''character strings. The search always proceeds from the current plac °
e''' °
'''of the prompt. You can not only specify the string to be found,''' °
'''but also give a replacement string. The buttons allow you to search °
''' °
'''forward or backwards. You can replace a specific string wherever''' °
'''it ocurrs, you can ignore case, and you can search only for APL nam °
es.''' °
'''Try the following exercise to get acquainted with this feature:'',r °
X' 'testfi' 'end' °
*(1996 3 29 16 24 8 384) °
FTEACH5 ÉFX 'TEACH5' 'Σ Opening an APL2 object' °
''' The last item on the Edit pull down menu provides a way to edit'' °
' °
'''APL2 defined functions, defined operators and rank 2 character arra °
ys.''' °
'''There is one other restriction: In the early versions of APL2OS2 th °
e''' °
'''object to be edited had to exist in the workspace. This no longer i °
s''' '''a requirement.''' °
'''When you select the "Open Object..." of the "Edit" pull down menu, °
an''' °
'''"Open Object" window appears. There are three buttons in the middle °
of''' °
'''this box. They are labelled: Variables, Functions, Operators. The'' °
' °
'''Function button is selected by default. Above these buttons, there °
is''' °
'''a box named "Open object name". You need not write in this box. Loo °
k''' °
'''instead down in the box labelled "Objects" and click on the name th °
at''' °
'''you wish to edit. Then press on the OK button. (If you pressed the' °
'' °
'''"Variables" button, and then selected a variable not containing a'' °
' °
'''rank-2 character array, you will hear a beep, and the bottom line o °
f''' '''the Session manager window will display an error message.)''' °
X 'do' 'testob' 'end' °
*(1996 3 31 14 51 43 632) °
FTEACH6 ÉFX 'TEACH6;LOOP' 'Σ Signals pull down menu' °
'''THE SIGNALS MENU'',r' °
'''If, as it happens occasionally, something goes wrong, you will want °
''' °
'''to interrupt the APL2 processing. You can use the SIGNALS pull down °
''' °
'''menu to do that. Of course, the PAUSE and ESC PAUSE (BREAK) keys ca °
n''' °
'''also be used In fact, the first two options on the Signals pull dow °
n''' '''menu contain two words:'',r' °
''' SUPPRESS PAUSE'',r,'' ATTENTION BREAK'',r' °
'''(The second word gives the key name on the keyboard). Why the''' °
'''terminology? (Suppress=Pause and Attention=Break) A mystery!'',r' °
''' When the PAUSE option is pressed, APL processing stops but no othe °
r''' '''action takes place.''' °
''' When the BREAK option is pressed, evaluation stops immediately. Th °
e''' °
'''function name and the line number will appear. The prompt also move °
s''' '''to a new line waiting for a keyboard entry.''' 'do' °
''' The third line on the Signals pull down menu is the INTERRUPT. Thi °
s''' °
'''simulates an error interrupt. As for the BREAK, processing will''' °
X '''continue if you enter ╕ÉLC.''' 'do' 'testsi' 'end' °
*(1996 3 28 16 49 33 580) °
FTEACH7 ÉFX 'TEACH7' 'Σ Options pull down menu' °
'''THE OPTIONS MENU'',r' °
'''The next pull down menu is called "Options". It allows you to modif °
y''' °
'''the behavior of your keyboard, and the Session Manager window. You' °
'' °
'''should test out the available options in the following exercises''' °
'''even if you are satisfied with the installed setup defaults.''' °
'do' '''APL On'',r' °
'''There is a toggle switch that allows you to make the keyboard behav °
e''' °
'''as either APL2 or ASCII. You can activate this toggle switch by one °
of''' '''two ways:'',r' °
''' 1. by simultaneously pressing Ctl and Backspace''' °
''' 2. by marking the "APL On" line on the Options pull down menu'',r' °
'''Look at the bottom line of the Session Manager window. It should re °
ad''' °
'''"Input [APL]". Now select the "Options menu" and remove the check'' °
' °
'''mark from the "APL On" line. The "[APL]" will disappear from the''' °
'''bottom line, meaning that the keyboard is now an ASCII keyboard. To °
''' °
'''return to the APL font place a check mark on the "APL On" line of t °
Xhe''' '''Options menu, or just press Ctl AND Backspace.''' 'end' °
*(1996 3 28 16 49 45 628) °
FTEACH8 ÉFX 'TEACH8' 'Σ Keyboards' '''CUSTOMIZING KEYBOARDS'',r' °
'''There are on the market a variety of keyboards. When you installed' °
'' °
'''APL2OS2 the process may not have defined the layout of the keys the °
''' °
'''way as they are shown on your keyboard. The line "Select Keyboard"' °
'' °
'''gives you the capability to re-define your keyboard to one of sever °
al''' °
'''common standards. When you select "Select Keyboard", a window named °
''' °
'''"Keyboard Layout Selection" appears. A window within this window''' °
'''called "Layout Names" displays a list of available layouts.'',r' °
'''The current setting is highlighted in this window. As an exercise,' °
'' °
'''select the line labelled "APL2 Union with European Characters", the °
n''' °
'''press OK. Now hold Alt down, and press in turn the keys for Q,P and °
M.''' °
'''You should see characters used in writing Spanish. To return back t °
o''' °
'''APL2, select "Select Keyboard" again and this time highlight the''' °
'''keyboard option that is most convenient for your configuration.''' °
'do' °
'''Suppose now, that your keyboard does not fit the pattern of any one °
''' °
'''of the available layouts. You can not only inspect what characters' °
'' °
'''are associated with your current keyboard, but you can even design' °
'' '''your own layout.'',r' °
''' All of this is possible if you select the "Modify Keyboard" option °
.''' °
'''When you select "Modify Keyboard ...", a new window called the''' °
'''"Keyboard Layout Modification" appears. On the left side there is a °
''' °
'''keyboard display (6 pages) showing all the possible characters that °
''' °
'''are available to you. At the top right an option window displays th °
e''' '''current layout name.'',r' °
'''(You can look at other layout names by pressing the button to the'' °
' '''right of this window, and selecting other names.)'',r' °
'''In fact, do the following exercise: Select in turn each of the''' °
'''layout names, and then inspect the keyboard layout (displayed on th °
e''' °
'''window)for each of the four states: Base, Shift, Ctrl and Alt. (You °
''' °
'''select the state by pressing the appropriate button on the "State"' °
'' '''panel.)''' 'do' °
'''Even if you are an accomplished user of APL, there may come a time' °
'' °
'''when you may not recall what key to press to get a specific APL2''' °
'''symbol. The "Modify Keyboard" option lets you see quickly the''' °
'''keyboard layout for any of the 4 keyboard states: BASE SHIFT CTRL'' °
' '''and ALT.''' 'do' °
'''Now that you have become familiar with what is available, suppose t °
hat''' °
'''you desire to design your own keyboard. To do that, select the "Add °
"''' °
'''button. Then enter the name of the keyboard of your own design on t °
he''' °
'''"Add New Layout" window and press OK. A copy of your current keyboa °
rd''' °
'''will be transferred to your layout. To modify your own keyboard,''' °
'''select a character from the keyboard display table by clicking on i °
t,''' °
'''and then select the key where that characte is to be placed. Contin °
ue''' °
'''this process until you have satisfied your requirements. You save t °
he''' °
'''newly defined keyboard layout by pressing the "Apply" button.''' °
X 'end' °
*(1996 3 28 16 49 57 676) °
FTEACH9 ÉFX 'TEACH9' 'Σ Setting up fonts' '''SETTING UP FONTS'',r' °
'''The choice of characters on the "Characters Notebook" of the "Modif °
y''' °
'''Keyboard" option can be changed by selecting different fonts.'',r' °
'''Of course as long as you plan to use APL2, your choice of fonts is' °
'' °
'''limited to those that support the special APL symbols. If, however, °
''' °
'''you have an application that does not use APL2 symbols, you can sel °
ect''' °
'''any one of the many fonts supported by your Operating System.'',r' °
'''When you select the "Font..." option, a "Font" window will appear o °
n''' °
'''your screen. There are four fields on this window (Name, Size, Styl °
e''' '''and Sample).'',r' '''Name''' °
''' This field contains the font name that is currently active. If yo °
u''' °
'''press the button at the right of this field, you will see a listing °
of''' °
'''other fonts supported by OS2. Marking any one of these names will m °
ark''' °
'''this font as a possible change. The box labelled "Sample" will disp °
lay''' °
'''a sample text in that font. To select the font, press the "Apply"'' °
' '''button.''' 'do' '''Size''' °
''' This window displays a measure of the size of the characters. To' °
'' °
'''see how this works, mark the button at right and then select some'' °
' °
'''numbers from the list. The Sample window will display the text in t °
he''' '''selected sizes.''' 'do' '''Style''' °
''' The Style window may or may not provide one or more styles depend °
ing''' °
'''on the font. If the font supports both the "Normal" and "Bold" styl °
es,''' °
'''you can see best the difference on a large size (e.g. 24). By the w °
ay,''' '''the font named "Helvetica" supports four distinct styles.''' °
'do' °
'''If you have selected a font a size and/or a style that you prefer,' °
'' °
'''select the "Apply" button. Pressing the "Reset" button will return' °
'' °
'''to the original font/size/style. Pressing the OK button will change °
X''' '''the setup of the setting and end the "Font" window.''' 'end' °
XCa 0 % °
*(1991 11 11 8 25 11 308) °
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]' °
*(1991 11 11 8 25 11 308) °
XFaq ÉFX 'u╜aq w' 'Σ Enclose quoted string' 'u╜Γaddquote w' °
*(1991 11 11 8 25 11 308) °
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' °
*(1996 3 29 15 43 50 624) °
Fcopyright ÉFX 'copyright' 'Σ Copyright statement' °
'(10µ'' ''),''Copyright, Z. V. Jizba, 1995'',r' °
'''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)''' 'do' °
XCd 0 " °
*(1991 11 11 8 25 13 316) °
Fdate ÉFX 'u╜date w' 'Σ Format date and time of day' 'u╜«6╞w' °
X 'u╜('' ''⌠u)Γu' 'u╜εu,■''-- .. ''' °
XCdig 1 10 1234567890 °
*(1991 11 11 8 25 10 304) °
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 8 16 11 5 26 312) °
Fdoif ÉFX 'U╢╜V╢ doif W╢;t╢;e╢;c╢;r╢' 'Σ Rule' '╕(^/~U╢╜V╢)/0' °
X 'W╢╜V╢/W╢' '╕(1<╧W╢)/L1' '»W╢' '╕0' 'L1:t╢╜»■W╢' °
XCe 1 0 °
*(1996 3 31 14 34 39 548) °
Fend ÉFX 'end' '''²²''' 'e╜''''' 'æ╜'' ''' 't╜æ' '╕(^/'' ''=t)/0' °
'╕(('':''εt)doif ''b╜evaldd (+/^\'''' ''''=t)╟t'')/3' °
'''e╜ÉEM'' ÉEA t' '╕(0=µ,e)/0' °
'''This is not a valid APL2 expression''' 'æ╜''*''' '╕(''?''⌠╞1╟æ)/0' °
X 'e' °
*(1991 11 11 8 25 11 308) °
XFendd ÉFX 'endd' 'Σ End of document' '20µ''²''' 'do' °
*(1995 4 23 14 14 25 380) °
Ferase ÉFX 'erase;t;DISPLAY;DOS;GO;PROFILE;SVOFFER' 't╜ÉNL 3' °
't╜(~t^.εlc,'' '')≡t' 't╜ÉEX(~t[;∞5]^.=''TEACH'')≡t' 't╜ÉNL 2' °
X 't╜ÉEX(~t^.εlc,'' '')≡t' 't╜ÉNL 4' 't╜ÉEX(~t^.εlc,'' '')≡t' °
*(1991 11 11 8 25 12 312) °
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' °
*(1995 5 24 13 49 1 428) °
Fexa ÉFX 'exa' 'Σ OS2 exercise' '''OS/2 EXERCISE'',r' °
'''Before discussing APL, it is useful do an exercise using the mouse' °
'' '''to switch between APL2 and the desktop'',r' °
'''In the upper right hand corner of the APL2 Session Manager window,' °
'' °
'''there are two buttons. The one with the small square will "minimize °
"''' °
'''this window. Before you try it, be sure to write down the following °
''' '''steps (so you can return back to APL2 quickly):'',r' °
''' 1. Click on the "minimize" button. (The APL2 window will disappear °
)''' °
''' 2. Click on the "Window list" (in OS/2 2.1 double click on the rig °
ht''' °
''' mouse button) A "Window list" window will appear. This list has °
''' °
''' the names of all active windows (whether they are visible or no °
t).''' °
''' 3. Click on the line "APL2 Session Manager". This will return you' °
'' ''' back to APL''' 'do' °
'''Remember these steps. They will be useful on a number of occasions' °
'' °
'''in these tutorials, whenever there will be reference to "minimizing °
X''' '''the Session Manager".''' 'do' °
*(1991 11 11 8 25 11 308) °
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 { °
*(1992 8 16 11 27 52 504) °
Ffkeys ÉFX 'fkeys W;B;T' 'Σ Display currenttly defined fkeys' °
'B╜~^/W=ÉAV[1]' °
'╕((^/B)doif ''''''Currently no F keys are defined'''''')/0' °
'''The following Fkeys are currently defined (r stands for ÉAF 0)'',r' °
X 'T╜(r,'' r'')replace W' '0 tab B≡(π«■∞30),'' '',T' °
XCg 1 2 } °
*(1991 11 11 8 25 12 312) °
Fget ÉFX 'u╜v get w;t' 'Σ Prompt for response from keyboard' °
't╜(0=ÉNC ''V'')doif ''V╜1''' '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' °
*(1991 11 11 8 25 11 308) °
Fglobals ÉFX 'globals' 'Σ Initialize useful global variables' 'r╜2╙ÉTC' °
'q╜40╙ÉAV' 's╜Φp╜'' '',d╜35╙ÉAV' 'uc╜''ABCDEFGHIJKLMNOPQRSTUVWXYZ''' °
'lc╜''abcdefghijklmnopqrstuvwxyz''' 'dig╜''1234567890''' °
X 'g╜'' '',h╜126╙ÉAV' 'f╜ÉAV[33 124]' 'a╜38╙ÉAV' °
XCh 0 } °
*(1996 3 28 16 45 40 592) °
Fhelp ÉFX 'help' °
'''If you feel that a single linear reading of these lessons is not th °
e''' °
'''best way to lear about APL2OS2, you may try to do the following.'', °
r' '''1. At any pause enter: ÉCR ''''TEACH''''''' °
''' (a listing of the components of the tutorial workspace will appe °
ar)''' °
'''2. Jot down the names that appear in UPPER CASE --mostly TEACHxx--' °
'' °
'''3. Each of these is a component of the lesson that can be invoked'' °
' °
''' at the pause simply by entering its name. This will repeat that' °
'' °
''' portion of the tutorial. The completion of each portion is marke °
Xd''' ''' by a line containing ²².''' 'end' °
*(1991 11 11 8 25 12 312) °
Finitialize ÉFX 'initialize;t' 'Σ Initialize workspace' 'erase' °
X 'globals' °
*(1991 11 11 8 25 11 308) °
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''' °
*(1991 11 11 8 25 12 312) °
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 °
*(1991 11 11 8 25 12 312) °
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' °
*(1991 11 11 8 25 12 312) °
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' °
XCp 1 2 " °
*(1991 11 11 8 25 12 312) °
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' °
XCq 0 ' °
XCr 0 °
*(1992 8 16 10 55 24 500) °
Freplace ÉFX 'u╜v replace w;i;r;s;t' 'Σ Replace elements in v in w' °
'╕((1<µµw)doif ''u╜π(Γv) replace■ Γ[µµw]w'')/0' 'i╜Γ∞µu╜w' °
't╜(1=╧v)doif ''v╜(v⌠'''' '''')Γv''' 's╜,2πv' 'i╜⌡r╜i⌡(1πv)╤■Γw' °
'╕((2≥╧v)doif ''u[(εi)/εr]╜s[(εi)/εi⌡■∞µs]'' ''u╜εu'')/0' °
X '''u╜w'' ÉEA ''u╜(╞r)╢rep╞╞v''' °
*(1991 11 11 8 25 12 312) °
Fround ÉFX 'u╜v round w' 'Σ Half adjust w to vth decimal' °
X 'u╜(╛0.5+w⌡10*v)÷10*v' °
XCs 1 2 " °
*(1991 11 11 8 25 12 312) °
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' °
*(1991 11 11 8 25 13 316) °
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' °
*(1991 11 11 8 25 13 316) °
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╜r,'' '',''╖'',w,''[É]'',(╞v)╞''╖''' 'n╜1╞µf╜ÉCR w' '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],r' °
*(1991 11 11 8 25 13 316) °
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' °
XCt 1 17 S╢TEACH╜'' °
*(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' °
*(1992 12 19 18 32 12 420) °
Ftestap ÉFX 'U╜V 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' °
'╕(2=ÉNC ''V'')/L0' °
'T╜''The following Auxilliary Processor'',(S╜1<+/~B)╞''s''' °
'T,(ε(S+1)╙'' is'' '' are''),'' not available'',(~B)/W' 'L0:U╜1' °
X 'T╜ÉEX■D' °
*(1995 6 11 13 18 39 408) °
Ftested ÉFX 'tested' 'Σ Exercise the Edit pull down menu' °
'''First, mark one or more lines of the above text.''' °
''' ( Since plain text is not executable by APL, be sure that the last °
''' °
''' marked line is a blank one -- because it is the last line that A °
PL''' ''' tries to evaluate.)''' 'do' °
'''Select "Copy" from the Edit menu. The marked text will be stored in °
a''' °
'''buffer. Now place the pointer at the BOTTOM of the page and pull do °
wn''' °
'''the "Edit" menu again. This time select the "Paste" line. The selec °
ted''' °
'''text will be pasted at the pointer. Mark this pasted text again,''' °
'''and this time select the "Cut" option from the pull down menu. The' °
'' '''selected text will disappear.''' 'do' °
'''In addition to the "Cut", "Copy" and "Paste", you should also try t °
he''' °
'''"Delete Marked", and the "Unmark all" options. Try to find the''' °
X '''difference between "Cut" and "Delete marked".''' 'do' °
*(1995 6 11 14 35 37 472) °
Ftestfi ÉFX 'testfi' 'Σ Exercise the FIND option' °
'''Place the cursor at the top of the page, then select the "Find" opt °
ion''' °
'''from the "Edit" menu. A FIND window will appear on the screen. Ente °
r''' °
'''the string "CUT" on the "Find text:" line. Then press the FIND butt °
on.''' °
'''If you have followed these instructions, there should be a QUAD ove °
r''' °
'''the C of the word "CUT" above. Press FIND again. The QUAD moves to °
the''' '''next ocurrence of the word.'',r' °
'''Now click on the buttons labelled "Reverse search" and "Ignore case °
"''' °
'''and press again on the FIND button. Then press FIND button again. T °
hen''' °
'''press "cancel"- or the left mouse button outside the FIND window. ( °
The''' °
'''QUAD will be replaced by the pointer, and the FIND window disappear °
s.)''' 'do' °
'''This time the search went bacwards, and the QUAD was replaced by th °
e''' '''pointer.'',r' °
'''To see how the replacement option works, move the pointer to the to °
p''' °
'''of the second last paragraph. Then open the FIND window fom the Edi °
t menu''' °
'''(note that its contents remain unchanged). Enter the string "REMOVE °
"''' °
'''on the line labelled "Replace text:". Then click on "Reverse search °
"''' °
'''to remove the check, and on the "Change all ocurrences" (to place a °
''' °
'''check mark there). This time, pressing the REPLACE button, all''' °
'''ocurrences of "cut" past the pointer will be replaced by REMOVE.''' °
X 'do' °
*(1995 5 29 14 34 10 428) °
Ftestlog ÉFX 'testlog' 'Σ Store and retrieve a session log' °
'''Take a blank formatted diskette and insert it into drive A:; then c °
lick''' °
'''on the "Log" pull down menu and select "Save as...". A "Save as" wi °
ndow''' °
'''will appear. It has five boxes labelled: "Save as filename", "Save °
file''' °
'''as type", "Drive", "File", and "Directory". The name shown on "Save °
as''' °
'''filename" apl00001.log is the default name of the log file. You can °
''' °
'''change this name if you wish. Next, click on the arrow button of th °
e''' °
'''"Drive" box and select the A: drive. When you do that, the "File" b °
ox''' °
'''should become empty (unless you have some files on your A:drive flo °
ppy).''' °
'''Press the OK button. The contents of the current session log will b °
e''' '''transferred to the A disk.''' 'do' °
'''Now, click on the "Log" pull down list again, and this time select °
the''' °
'''"NEW" line. A "Session Manager Message" box will appear. Click on t °
he''' '''OK button. Your session manager screen will clear.'',r' °
'''To recover your session log, click on the "Log" pull down menu agai °
n,''' °
'''and click on OPEN. Select the A: drive, and the session log. When y °
Xou''' '''click on OK, your original session will be restored.''' 'do' °
*(1996 3 31 14 39 3 424) °
Ftestob ÉFX 'testob;T;FOO;ARRAY;OP' 'Σ Test the Edit Object option' °
'T╜ÉFX ''FOO'' ''Σ Sample APL2 function'' ''''''Replace this line by t °
ext''''''' °
'T╜ÉFX ''(X OP) W'' ''Σ Sample APL2 defined operator'' ''X/W''' °
'ARRAY╜2 2µ''ABCD''' °
'''This exercise will show how the Edit function works. When you press °
''' °
'''"Open object..", there is a sample function (FOO), a sample array'' °
' '''(ARRAY) and a sample operator (OP) that you can edit without''' °
'''disturbing the functions of this workspace.'',r' °
'''To see these objects, enter ÉCR ''''FOO'''', then ÉCR ''''OP'''', a °
nd''' °
'''finally DISPLAY ARRAY. (Or just enter: FOO, then +OP ∞5 and ARRAY)' °
'' 'do' °
'''Now, select the VARIABLES button from the "Open object" window. The °
''' °
'''"Objects" box will show a list of active variables in this workspac °
e.''' °
'''Click on the ARRAY line. The word ARRAY will appear on the top box. °
''' °
'''If you now click on the OK button, a new window will appear showing °
''' °
'''the contents of this variable. You can now make changes to the arra °
y.''' °
'''When finished, enter DISPLAY ARRAY, to see the contents of this''' °
'''variable. Befoe you quit this exercise, try also to edit the functi °
Xon''' '''FOO and the operator OP.'',r' '''WARNING: If you''' 'do' °
*(1996 3 31 14 54 53 684) °
Ftestsi ÉFX 'testsi;LOOP;T' °
'Σ Test pulldown options in the Signals pull down menu' °
'''A function such as LOOP can be used here to test the three options' °
'' °
'''of the Signals pull down menu. This function does not work well unl °
ess''' °
'''you place a check mark on "Scroll" line of the OPTONS pull down men °
u.''' °
'''(Be sure THERE IS A CHECK on the SCROLL line of the OPTIONS menu be °
fore''' '''you proceed with this exercise!)''' °
'T╜ÉFX ''LOOP'' ''É╜''''DELAY='''',ÉDL 1'' ''╕1''' 'showfn ''LOOP''' °
'do' °
'''When you enter LOOP, a message will appear on the screen every''' °
'''second. By pressing PAUSE this activity will stop. To continue, you °
''' °
'''have to press either BREAK or INTERRUPT, followed by ╕ÉLC. The mess °
age''' '''will continue appearing every second or so.''' °
'''After pressing BREAK, the prompt moves to a new line. Enter ÉLC to' °
'' °
'''see where in the execution stack you are. Now enter ╕ÉLC again to'' °
' °
'''continue execution of the loop. Then select the INTERRUPT option''' °
'''from the menu. This will cause an INTERRUP message to be displayed' °
'' °
'''on the screen. To exit the loop enter ╕0 after a BREAK or INTERRUPT °
''' '''Now, enter: LOOP'',r' 'æ╜'' '' ╪ »æ' °
'''In summary, PAUSE will just halt the execution. BREAK will interrup °
t''' °
'''and place the prompt on a new line waiting for an keyboard entry.'' °
' '''BREAK will simulate an error by displaying an error message.''' °
X 'do' °
XCuc 1 26 ABCDEFGHIJKLMNOPQRSTUVWXYZ °
*(1996 3 29 15 48 20 524) °
Fwelcome ÉFX 'welcome' 'Σ Introduction to APL2OS2 tutorials' °
'''Welcome to the APL2OS2 tutorial. If you are not acquainted with APL °
,''' °
'''you should begin with the workspace TEACH1. If you already know APL °
''' °
'''and if you use APL2/PC, the workspaces named TEACH23 trough TEACH40 °
''' °
'''have tutorials on the auxilliary processors supported by that versi °
on''' °
'''of APL2. This lesson is first of the series explaining APL2OS2.'',r °
' '''The objective of this and subsequent lessons is to provide an''' °
'''interactive environment for learning and testing of those features' °
'' °
'''of APL2OS2 that are unique to this product. Although most if not al °
l''' °
'''of the information is available on-line, it is not in a form that'' °
' °
'''can be tested at the same time as one reads the text. To be sure,'' °
' °
'''the documentation is displayed in a separate window, so that it can °
''' °
'''be moved, minimized and manipulated. If you feel that the IBM on li °
ne''' °
'''documentation is adequate, you may wish to exit from this workspace °
,''' °
'''and ignore these tutorials. Nevertheless, you might try to read on, °
''' '''and possibly find this approach useful.'',r' °
'''NOTE: Whenever there is a pause, you are expected to:''' °
''' a) read the text'',r,'' b) follow the instructions (if any)''' °
''' c) press Enter to continue the lesson'',r' °
'''As the lesson proceeds, you may on occasion scroll back to see any' °
'' °
'''discussion or explanation that may no longer be visible. If this''' °
'''is not adequate, you may also enter "help" (in l.c. and no quotes)' °
X'' '''for another way to use this tutorial.''' °