home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
teachapl.zip
/
TEACH.ZIP
/
TEACH0.ATF
< prev
next >
Wrap
Text File
|
1997-09-14
|
80KB
|
971 lines
XNÉIO 0 1 °
XNÉCT 0 1E²13 °
XCÉFC 1 6 .,*0_² °
XNÉRL 0 16807 °
XCÉPR 1 1 °
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' °
*(1996 4 6 16 1 57 400) °
FEXIT ÉFX 'EXIT' 'Σ Exit from function' '''To log off type: )OFF''' °
X '╕' °
*(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' °
*(1997 8 22 11 54 54 664) °
FHELP ÉFX 'HELP;N;I;T' 'Σ Help to student' '''WHAT TO DO'',r' °
''' ° To get out of the lesson''' ''' ENTER: EXIT''' °
''' ° To log off APL2''' °
''' FIRST, ENTER: EXIT THEN ENTER: )OFF''' °
''' ° To get help''' ''' ENTER: HELP''' 'do' °
'''This lesson is made up of '',(«N╜13),'' components named TEACHx, wh °
ere''' '''the x stands for a digit:'',r' 'I╜0' °
'L0:T╜''TEACH'',(«I╜I+1)' 'T,'' '',1╟notb(ÉCR T)[2;]' '╕(N>I)/L0' °
X 'endd' °
*(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' °
*(1997 9 12 12 42 6 392) °
FTEACH ÉFX 'TEACH' 'Σ Introduction to APL2OS2 tutorials' 'initialize' °
'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' °
*(1997 9 12 12 41 3 376) °
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' '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.''' 'endd' °
*(1997 7 8 11 34 11 352) °
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 'endd' °
*(1997 7 8 11 34 28 420) °
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.''' 'endd' °
*(1997 8 22 12 29 40 512) °
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 items on the "Options..." pull down menu are toggle switch °
es.''' °
'''The usage of these toggle switches may not be very clear unless you °
''' °
'''are VERY familiar with APL. Nevertheless feel free to experiment:'' °
' '''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", "Display stack" and on leav °
ing''' '''APL2, "Confirm Close" options.'',r' °
'''The "Save Continue" toggle switch allows you to save the APL2 sessi °
on''' °
'''when you close APL2. If this toggle swith is checked, and IF you lo °
g off''' °
'''by clicking on the upper left button of the Session Manager window' °
'' °
'''followed by selecting CLOSE, then on re-entering APL2, the session' °
'' °
'''will continue as if there had been no interruption. Your session ha °
d''' °
'''been saved in workspace CONTINUE. You can remove this workspace by' °
X'' '''entering:'',r,'' )DROP CONTINUE''' 'endd' °
*(1997 7 31 13 40 7 460) °
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 active 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. Press Ctrl Esc''' °
''' 2. Select APL2 for OS2, icon view ''' °
''' 3. Click on the icon with the type of information you need''' °
''' 4. When finished use the same procedure to get back to the Session °
Manager.''' 'do' °
'''This completes the instructions on using APL2OS2. To start learning °
''' °
'''about APL2, place the APL2OS2 tutorials diskette on your A: disk, a °
nd''' '''enter (assuming you defined your A diskette as LIB 10)'',r' °
''' )LOAD 10 TEACH1A'',r' °
'''NOTE: If the tutorial files are in the ATF format (that is when you °
''' °
''' enter )LIB 10, you get a listing of the form TEACH1.ATF...),' °
'' °
''' then the procedure for loading a tutorial is a s follows:''' °
''' 1. Enter: )CLEAR --To get a clear workspace''' °
''' 2. Enter: )IN TEACH..A --Instead of )LOAD TEACH..A''' °
X ''' 3. Enter: TEACH --To start the lesson''' 'endd' °
*(1997 8 22 11 58 18 536) °
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' °
'''Also do not forget to define your diskette as a library. Assuming t °
hat''' °
'''your diskette resides on the A disk, and assuming you wish to call °
it''' '''library #10, you would enter the following line:'',r' °
'''SET APL00010=A:''' 'do' °
'''(You may wish to enter more library numbers in this manner, but be °
sure''' °
'''that the named directories already exist.) At this time you may als °
o''' °
'''wish to review the list of Environment variables (p. 17 of User'''' °
s Guide).''' °
'''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 (Alternately °
to''' °
'''get the "Window list" press CTL-ESC. You will have to do that from °
APL2),''' °
'''then double click on the APL2 Session Manager line. Remember that y °
our''' °
'''newly defined libraries (such as 10 and 12) will not become active °
until''' '''the next 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, a better way to introduce parameters to AOSAPL2.EXE. If yo °
u''' °
'''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''' 'endd' °
*(1997 8 22 11 58 25 564) °
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' 'endd' °
*(1997 8 22 11 58 34 600) °
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' 'endd' °
*(1997 8 22 11 58 44 640) °
FTEACH5 ÉFX 'TEACH5' 'Σ Opening an APL2 object' °
''' The last item on the Edit pull down menu provides a way to edit'' °
' °
'''APL2 objects. We will postpone describing the process until after'' °
X' '''we have covered some aspects of APL2 in the tutorials.''' 'endd' °
*(1997 8 22 11 58 53 676) °
FTEACH6 ÉFX 'TEACH6;LOOP' 'Σ Signals pull down menu' °
'''THE SIGNALS MENU'',r' °
'''If, as it happens occasionally, something goes wrong while you are' °
'' °
'''doing APL2, you will want to interrupt the APL2 processing. This ca °
n''' °
'''best be done using the SIGNALS pull down menu. Here again, we will' °
'' °
'''postpone discussion of this subject until such time you learn about °
X''' '''using APL2.''' 'Σdo' 'Σtestsi' 'endd' °
*(1997 8 22 11 59 2 476) °
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. Is there a'' °
' °
'''line containing: "Input [APL]? (If not, press on the bigger square °
on''' '''the upper right corner of the Session Manager window.)'',r' °
'''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 th °
e''' °
'''APL font place a check mark on the "APL On" line of the Options men °
u,''' '''or just press Ctl AND Backspace.''' 'do' °
'''FOR NOW BE SURE THERE IS A CHECK MARK ON THE "APL ON" LINE!''' °
X 'endd' °
*(1997 8 22 11 59 9 504) °
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. For example,''' °
'''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 "APL2 Union with Box Characters".''' '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 'endd' °
*(1997 8 22 11 59 18 540) °
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.''' 'endd' °
*(1997 7 13 12 28 49 504) °
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' °
*(1997 7 24 13 20 38 476) °
Fav ÉFX 'av;A;N;I;ÉIO' 'Σ Display characters in ÉAV' 'ÉIO╜0' °
'A╜22 78µ'' ''' 'N╜3 0«φ12 22µ1+∞356' 'A[;,(6⌡∞12)°.+2 3 4]╜N' °
'A[;6+6⌡∞12]╜φ12 22µÉAV' 'ΣA[8 10 13;6]╜'' ''' 'A[13;6]╜'' ''' °
X 'A[14+∞8;68 69 70 72]╜'' ''' 'A' °
*(1997 7 29 12 45 59 676) °
Fcopyright ÉFX 'copyright' 'Σ Copyright statement' °
'(10µ'' ''),''Copyright, Z. V. Jizba, 1995'',r' °
'''This and subsequent workspaces labelled TEACHxxA 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' °
*(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 °
*(1997 7 13 12 28 50 508) °
Fdo ÉFX 'do;T;E' 'Σ 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' °
*(1997 7 13 12 28 50 508) °
Fdoif ÉFX 'U╢╜V╢ doif W╢;t╢' 'Σ Rule' '╕(^/~U╢╜V╢)/0' °
X '''U╢╜V╢ doif■ W╢'' ÉEA ''»V╢/W╢''' °
*(1997 7 31 13 40 25 532) °
XFendd ÉFX 'endd' 'Σ end of special feature' '20µ''²''' 'do' °
*(1997 8 22 11 57 24 556) °
Ferase ÉFX 'erase;t;DISPLAY;DOS;GO;SVOFFER;HELP;EXIT' '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' °
*(1997 7 27 13 47 41 608) °
Fevaldd ÉFX 'u╜evaldd w;c;n' 'Σ Evaluate direct definition' 'u╜0' °
'n╜(w∞''Σ'')-1' 'c╜(((n╞w)⌠'':'')Γn╞w),Γ''ΣDD '',(n+1)╟w' °
'╕((1 label╞c)doif ''''''Invalid label'''''')/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' °
*(1997 9 12 12 41 21 448) °
Fexa ÉFX 'exa' 'Σ OS2 exercise' '''OS/2 EXERCISE'',r' °
'''Before discussing APL, it is useful to do an exercise using the mou °
se''' '''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". a "Window list" window will appear. °
''' °
''' This list has the names of all active windows (whether they are °
''' ''' visible or not).''' °
''' 3. Click on the line "APL2 Session Manager". This will return you' °
'' ''' back to APL''' 'do' °
'''Remember these steps. They may be useful to you whenever you will'' °
X' '''want to switch between APL2OS2 and other software''' 'endd' °
*(1997 7 25 13 27 52 564) °
Fexit ÉFX 'V exit W;T' 'Σ Exit if too many suspended functions' °
'╕(0⌠ÉNC ''V'')/L0 ╪ V╜10' 'L0:╕(V>µÉLC)/0' °
'''There are too many suspended functions''' '''Please enter '',W' °
X '╕' °
*(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' °
*(1997 7 26 12 33 39 536) °
Fget ÉFX 'U╜V get W;t;T;ÉPR' 'Σ Prompt for response from keyboard' °
'ÉPR╜T╜ÉAV[ÉIO+255] ╪ ╕(0⌠ÉNC ''V'')/L0 ╪ V╜1' 'L0:V╜V╧1' 'æ╜W ╪ t╜æ' °
'U╜(+/^\t=T)╟t' '╕(''╕''⌠╞U)/L1 ╪ ╕' 'L1:╕V/0' 't╜(U⌠'' '')ΓU' °
X 'U╜(µt),(ΓU),t' °
*(1997 7 28 13 33 8 424) °
Fglobals ÉFX 'globals' 'Σ Initialize useful global variables' °
'uc╜''ABCDEFGHIJKLMNOPQRSTUVWXYZ''' °
'lc╜''abcdefghijklmnopqrstuvwxyz''' 'dig╜''1234567890''' °
X 'r╜ÉAV[13+ÉIO]' 'q╜''''''''' °
*(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' °
*(1997 7 31 13 9 28 420) °
Finitialize ÉFX 'initialize;T' 'Σ Initialize workspace' 'globals' °
'''AT ALL TIMES, TO CONTINUE, PRESS RETURN!'',r' °
'Σ''To see disclaimers enter:'',r,'' disclaimer''' 'do' 'erase' °
'''Make sure the CAP LOCK light on your keyboard (upper right) is ON!' °
X'' 'endd' °
*(1997 7 27 13 14 33 444) °
Flabel ÉFX 'u╜v label w' °
'Σ Return 1 if label w does not begin with a cap' °
'╕(0⌠ÉNC ''v'')/L0 ╪ v╜0' 'L0:v╜v╧1 ╪ w╜εw ╪ ╕v/L1 ╪ ╕(u╜0⌠ÉNC w)/0' °
X 'L1:╕(u╜~^/wεlc,uc,dig)/0' 'u╜w[1]εlc,dig' °
XClc 1 26 abcdefghijklmnopqrstuvwxyz °
*(1997 7 13 12 28 55 528) °
Fnon ÉFX 'non;T;RC;ET;R' 'Σ Ignore keyboard entry' 'æ╜'' ''' 'T╜æ' °
'╕(0=µ(T⌠'' '')/T)/0' '(RC ET R)╜ÉEC T' '╕(0=RC)/2' °
X '╕((1=RC)doif ''R'')/2' '╕2' °
*(1997 7 13 12 28 55 528) °
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' °
*(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' °
*(1997 7 27 12 55 6 496) °
Fproblems ÉFX 'problems' 'Σ Problems' °
'''That is all for this lesson. Remember, if you want to practice,''' °
'''and plan to use direct definitions, be sure to first enter GO.''' °
'''Direct definitions will then be accepted. To exit GO, enter EXIT.'' °
,r' °
'''To erase a previously defined DIRECT DEFINITION FUNCTION, enter'',r °
' ''' )ERASE functionname'',r' °
X '''WARNING! do not use )ERASE on other labels.'',r' °
XCq 0 ' °
XCr 0 °
*(1997 7 13 12 28 56 532) °
Freplace ÉFX 'u╜v replace u;i;r;s' 'Σ Replace elements in v in u' °
'i╜Γ∞µu' 's╜2πv╜(v⌠'' '')Γv' 'i╜⌡r╜i⌡■Γ[1]u°.=╞v' °
X 'u[(εi)/εr]╜s[(εi)/εi⌡■∞µs]' °
*(1997 7 13 12 28 56 532) °
Fround ÉFX 'U╜V round W' 'Σ Half adjust to V th decimal' °
X 'U╜(╛0.5+W⌡10*V)÷10*V' °
*(1997 7 13 12 28 57 536) °
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' °
*(1997 7 13 12 28 57 536) °
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' °
*(1997 7 13 12 28 57 536) °
Fshowfn ÉFX 'U╜V showfn W;F;N;T;ÉIO' 'Σ Simulate ╖W[É]' °
'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),('' ╖'')[╞V],r' °
*(1997 7 13 12 28 58 540) °
Fsimdd ÉFX 'u╜simdd w;e' 'Σ 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' °
*(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' °
*(1997 7 13 12 28 59 544) °
Ftest ÉFX 'U╜V test W;P' °
'Σ Describe problem in W, (correct answer in V)' 'U╜2' 'L1:W' °
'É╜'' ''' 'P╜æ' '''╕L0'' ÉEA ''P╜»P''' '╕(V╧P)/0' °
X 'L0:╕(0=U╜U-1)/0' '''Incorrect. Try again''' '╕L1' °
*(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' °
*(1997 9 14 12 21 49 488) °
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 backwards, and the QUAD was replaced by t °
he''' '''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 °
*(1997 7 29 12 52 55 688) °
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 TEACH1A. If you already know AP °
L''' °
'''there are tutorials on the auxilliary processors. You can download' °
'' '''these from the APL archives.'',r' °
'''NOTE:These tutorials are based on a similar set developed some year °
s''' °
''' ago for TRYAPL. To avoid name confusion between those workspac °
es''' °
''' (named TEACH1 through TEACH22) and these, the APL2OS2 workspac °
es''' ''' have been named TEACH1A through TEACH22A.''' 'do' °
'''The objective of this and subsequent lessons is to provide an''' °
'''interactive environment for learning APL2. Although most, if not al °
l''' °
'''of the information is available on-line and in the supplied manuals °
,''' °
'''it is not in a form that can be tested at the same time as one read °
s''' °
'''the text. If you feel that the IBM provided documentation is adequa °
te,''' °
'''you may wish to exit from this workspace, and ignore these tutorial °
s. ''' °
'''Nevertheless, you might try to read on, and possibly find this appr °
oach''' '''useful in learning how to use APL2.'',r' 'do' °
'''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 a lesson proceeds, you may on occasion scroll back to see any''' °
X '''discussion or explanation that may no longer be visible.''' °