home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
teachapl.zip
/
TEACH.ZIP
/
TEACH1A.ATF
< prev
next >
Wrap
Text File
|
1997-09-14
|
66KB
|
805 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 °
XCALPHA 1 26 ABCDEFGHIJKLMNOPQRSTUVWXYZ °
XNARRAY 2 2 2 1 2 3 4 °
XAAS╜23-33⌡ÉIO-∞10 °
XCBOX 2 2 3 CATDOG °
*(1997 9 14 12 30 44 504) °
XFDISCLAIMER ÉFX 'DISCLAIMER' 'Σ Copyright statement' 'disclaimer' °
*(1996 4 6 15 55 23 476) °
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 15 55 23 476) °
FEXIT ÉFX 'EXIT' 'Σ Exit from function' '''To log off type: )OFF''' °
X '╕' °
*(1996 4 6 15 55 23 476) °
FGAUSS ÉFX 'GAUSS' 'Σ Story of Gauss as 11 year old' °
'''When the great mathematician, Karl Friedrich Gauss was about 11 yea °
rs''' °
'''old, his teacher, Herr Buttner, liked to assign arithmetic progress °
ions''' °
'''to his students to practice addition. It would take them at least'' °
' °
'''one hour to add one hundred such numbers. But Gauss surprised his'' °
' °
'''teacher by coming up with the correct answer in just a few minutes' °
'' '''by deducing the right formula. Can you work out this formula?''' °
'''Try to apply your formula to the sequence in AS. In the next''' °
'''lesson we will find an even easier way to solve that problem.'',r' °
X 'endd' °
*(1996 4 6 15 59 48 592) °
FGO ÉFX 'GO;T;E;B' 'Σ 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 12 12 22 17 352) °
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''' °
''' ° When you see the cursor on a blank line''' °
''' ENTER AN APL2 EXPRESSION - OR JUST PRESS: ENTER''' 'do' °
''' ° If you get this line'',r' °
'''This is not a valid APL2 expression'',r,''*'',r' °
''' YOU CAN EITHER''' ''' A. PRESS: ENTER''' °
''' B. PRESS: ? and then ENTER to see what was incorrect''' °
''' in your expression causing that response'',r' 'do' °
'''HINTS'',r' °
'''This lesson is made up of '',(«N╜9),'' components named TEACHx, whe °
re''' '''the x stands for a digit:'',r' 'I╜0' °
'L0:T╜''TEACH'',(«I╜I+1)' 'notb T,'' '',1╟notb(ÉCR T)[2;]' °
'╕(N>I)/L0' 'do' °
'''You may review either of these components separately. To do that,'' °
' °
'''first enter EXIT (and RETURN), then enter the name of the lesson.'' °
' '''component (e.g. TEACH4).'',r' °
'''To re-start the lesson, just enter TEACH'',r' °
'''You may press PAGE UP to review previous pages.''' 'do' °
'''RESOURCES'',r' °
'''You may also enter ONE of the following words'',r' °
'''GAUSS A historical footnote on the early life of Gauss''' °
'''TEACHER To explain this tutorial to those planning to teach APL2'' °
X' 'endd' °
*(1997 8 1 13 1 35 300) °
FKEYBOARD ÉFX 'KEYBOARD' 'Σ Explain keyboard' ''' APL2 SYMBOLS'',r' °
'''The first lesson (TEACH0) described among other things how you can' °
'' °
'''select a font using the OPTIONS pull down menu. Before we begin, it °
''' °
'''is useful to review how you can find out what keys to press to obta °
in''' °
'''any one particular symbol. It is presumed here that you followed th °
e''' °
'''instructions of the first lesson (TEACH0) to install the "APL2 Unio °
n''' °
'''with Box Characters" font. As this lesson proceeds, symbols will be °
''' °
'''introduced that you will not find on your keyboard. These "new"''' °
'''symbols will require you to press TWO keys: A gray key SHIFT, CTRL °
or''' °
'''ALT, and a white key. Here is how you can find out what keys to pre °
ss''' '''to obtain a specific symbol:'',r' °
'''1. Select the OPTIONS pull down menu''' °
'''2. Click on the "Modify keyboard ..." option''' °
'''3. A keyboard layout will appear'',r' °
''' Click in turn the 4 buttons in the STATE box. For each button °
''' °
''' the keyboard layout will display the symbols represented by t °
he''' °
''' keyboard keys (note however that CAPS and lower case are reve °
rsed)'',r' °
'''DO THIS NOW. THEN CLOSE THE PULL DOWN MENU AND PRESS ENTER'',r' °
'non' °
'''Now try some combinations pressing either CTRL or ALT and some keys °
on''' '''your keyboard.'',r' °
'''As the special symbols are introduced in the tutorial, you will wan °
t''' '''to use the "Modify Keyboard ..." procedure to find them.'',r' °
'''TO CONTINUE THE LESSON, PRESS ENTER-- ONCE occasionally even TWICE) °
X'',r' 'non' 'endd' °
XCNAME 1 6 GEORGE °
XNSUPERCALIFRAGILISTICEXPIADOCIOUS 0 1234.56789 °
*(1997 8 3 13 4 12 228) °
FTEACH ÉFX 'TEACH' 'Σ Start first lesson in APL2 by Zdenek V JIZBA' °
'exit ''TEACH''' 'initialize' °
'TEACH1 Σ Introduction; setting up the keyboard' °
'TEACH2 Σ APL2 as calculator; character strings' °
'TEACH3 Σ numbers, characters and scalars' °
'TEACH4 Σ vectors; primitive functions' °
'TEACH5 Σ negative numbers; the concepts MONADIC and DYADIC' °
'TEACH6 Σ equal, not equal and membership' °
'TEACH7 Σ re-execution, assignment and muliple specification' °
'TEACH8 Σ shape and reshape' 'TEACH9 Σ index generator and index of' °
'''That is all for this lesson. Feel free to scroll up the screen to r °
eview''' °
'''the text. If you want to try out some additional exercises, enter f °
irst:''' ''' GO'',r' °
'''(This will avoid certain error messages should you enter invalid''' °
''' expressions. We will discuss these error messages in a later lesso °
Xn.)''' °
*(1997 8 25 13 4 58 500) °
FTEACH1 ÉFX 'TEACH1;T' 'Σ Explain keyboard, initialize lesson' °
'exit ''TEACH1''' °
'''APL2 is more than a programming language; it is a way of thinking.' °
'' °
'''As you proceed, you will feel as if entering a totally new landscap °
e''' °
'''You will be able to solve problems quicky and easily. But even more °
''' °
'''important, you will gradually change the way you approach solving'' °
' °
'''problems on a computer. Even if you never again use APL2, this lear °
ning''' '''experience will make a better programmer out of you.'',r' °
'''(To continue press Enter)''' 'do' °
'''But first, there are some ground rules for this lesson:''' °
''' 1. When you finish reading the text on the screen, check that the' °
'' °
''' cursor is on a blank line. You may enter an APL2 expression at' °
'' ''' this point. Pressing ENTER will display more text.''' °
''' 2. APL2 uses special symbols to describe the task to be done.''' °
''' As the lessons proceed, you will get acquainted with all of''' °
''' these symbols. For now do not worry about it.''' °
''' 3. If you want to quit this lesson, simply enter: EXIT, and''' °
''' then enter: )OFF''' °
''' 4. To move the contents of the screen, you can use the PAGE UP''' °
''' and PAGE DOWN keys. Moving the cursor up from the top line or'' °
' ''' down from the bottom line will scroll the screen.''' °
''' 5. Whenever a new term is introduced, it will be in CAPS. You are' °
'' °
''' not expected to memorize these terms, but with frequent usage'' °
' °
''' you will become familiar with them. On occasion the name of the °
''' °
''' term will be a common word. Whenever there is a possibility to' °
'' °
''' confuse such name with the word usage, we will continue to''' °
''' capitalize the APL2 name.''' °
''' 6. To enter any expression, start in any column on a BLANK line.'' °
' °
''' 7. From time to time the text will suggest you to enter a word''' °
''' in caps. This will produce additional explanation on the subjec °
t''' °
''' under discussion. For a first reading, it is suggested you''' °
''' ignore this (the explanation may interfere with the normal flow °
''' ''' of the tutorial.)''' °
''' 8. These lessons have been developped for APL2OS2, but should be'' °
' °
''' valid for any version of APL2. For non-PC versions of APL2,''' °
''' there may be minor differences regarding some OS options.'',r' °
'''(You may wish to print this screen or copy it for reference)'',2µr' °
'do' °
'''P.S. If you are a teacher of APL2, type TEACHER for more info.'',r' °
'do' '''You may also at any time enter: HELP'',r' 'show ''HELP''' °
'''(Function HELP was a kind of a detour. The dashed lines:''' °
'''_________________''' °
'''indicate the end of that detour, in this case the end of HELP.)''' °
X 'do' '''OK now, are you ready?''' 'endd' °
*(1997 8 1 13 12 7 232) °
FTEACH2 ÉFX 'TEACH2' 'Σ Immediate execution mode' 'exit ''TEACH2''' °
'KEYBOARD' ''' APL2 AS A HAND CALCULATOR'',r' °
'''You can use APL2 much the same as a hand held calculator.'',r' °
'''Here is a sample (remember to press RETURN after each example):'',r °
' 'show ''5+3'' ''6-12'' ''4⌡2'' ''25÷5''' 'do' °
'''Now try to use the keyboard as if it were a hand calculator.''' °
'''Enter as many problems (i.e. samples of addition division etc) as'' °
' '''you wish, but when you press ENTER on a blank line, the lesson''' °
'''will continue. If you press the wrong key, backspace and re enter.' °
'' 'do' °
'''You may have entered an expression that could not be evaluated.''' °
'''If you have not, then do it now: Enter some meaningless text,''' °
'''and then press ENTER. (Press enter again after reading the message) °
''' 'do' °
'''There is a way to enter text: It must be in (SINGLE) quotes.'',r' °
'show ''''''THIS IS SAMPLE TEXT''''''' °
'''When APL2 evaluates text, it merely strips off the quotes, and''' °
'''"echoes" the text on the screen.'',r' '''Now you try it:''' 'do' °
X 'endd' °
*(1997 8 22 12 37 29 500) °
FTEACH3 ÉFX 'TEACH3' 'Σ Describe APL2 data types' 'exit ''TEACH3''' °
'''You have just seen how APL2 handles numbers and characters.'',r' °
'''In APL2, these are the only DATA TYPES.''' 'do' °
'''A number can be an INTEGER (a whole number like 12) or it can be''' °
'''a REAL number (a number with a decimal point like 12., 3.45).''' °
'''A real number can also be represented in SCIENTIFIC NOTATION''' °
'''(3.45 can be written as 0.345E1).'',r' 'show ''12 3.45 0.345E1''' °
'''Notice that these numbers can be entered on a single line. Note''' °
'''also that APL2 evaluated that line, and RETURNED the result.'',r' °
'''A line of numbers as in the example above is called a VECTOR.'',r' °
'''Write a vector containing four numbers:''' 'do' °
'''Actually a string of characters enclosed in quotes is also called'' °
' '''a vector.'',r' 'show ''''''GEORGE''''''' °
'''The string ''''GEORGE'''' is a CHARACTER VECTOR of length 6.'',r' °
'do' '''In APL2 a vector is defined by two characteristics:'',r' °
''' 1. It''''s contents''' ''' 2. Its length'',r' °
'''You can even mix characters AND numbers:'',r' °
'show ''''''THIS VECTOR IS MIXED:'''' 2 3 4 5''' °
'''WARNING: A character vector may look like numeric:'',r' °
'show ''''''2.34 5.71 32 65''''''' °
'''Before such a character vector can be processed numerically, it''' °
'''must first be converted to NUMERIC. In a later lesson we will''' °
'''learn how to do these things. For now do not worry about it.'',r' °
'do' °
'''There is one other term that you should note (and for the time''' °
'''being, ignore!). It is a SCALAR. A single character, or a single''' °
'''number are examples of simple SCALARs.'',r' 'do' °
'''In the following examples 23.5678 and the letter ''''K'''' are scal °
ars'',r' 'show ''23.5678'' ''''''K''''''' °
'''Why did we use the term ''''simple scalars''''? Because in a later' °
'' '''lesson, we will learn about other more complex entities that''' °
'''also have the scalar properties.'',r' °
'''But now, let us proceed with the elementary aspects of APL2, and''' °
X '''take a look at simple arithmetic.'',r' 'endd' °
*(1997 8 3 12 47 25 448) °
FTEACH4 ÉFX 'TEACH4' 'Σ Simple arithmetic' 'exit ''TEACH4''' °
'''In APL2, it is possible to do calculation on vectors. What do we''' °
'''mean by that? Here is an example:'',r' °
'show ''5⌡3 12.34 0.666E²2''' °
'''Note that each of the three numbers was multiplied by 5, and the''' °
'''result of that computation was displayed as the result.'',r' 'do' °
'''In many other computer languages, this process requires setting''' °
'''up what is called a DO LOOP, which calculates the answer one''' °
'''product at a time. Indeed, in some languages, it is required that'' °
' °
'''all numbers in the vector must be of the same type (integers or''' °
'''reals). In APL2 this kind of housekeeping is done by APL2, and''' °
'''gives you the freedom to concentrate just on your problem.'',r' °
'do' '''There is another aspect of APL2 that helps:'',r' °
'''The symbols for addition, subtraction, multiplication and division' °
'' '''are the same ones you learned in school:'',r' °
'show ''3⌡5'' ''12-6'' ''24÷6''' 'do' °
'''Did you try to divide a number by zero? Try it now!''' 'do' °
'''As you can tell that is invalid. Now try to divide zero by zero!''' °
'do' °
'''APL2 will on occasion surprise you. Do not be afraid to experiment. °
''' 'do' °
'''APL2 has a special name for symbols like +-⌡÷. These, and many more °
''' °
'''that we will introduce in time, are called PRIMITIVE FUNCTIONS.''' °
'''All primitive functions transform (or generate data) in some way. I °
n''' °
'''addition to the four arithmetic functions you have just learned abo °
ut''' °
'''there are over fifty others. In time we will study them all, but at °
a''' °
'''slow pace. You will get a chance to get thoroughly acquainted with' °
'' '''each one of them.''' 'do' °
'''We will also learn about other aspects of this language. We will se °
e''' °
'''how to go about defining new functions by combining one or more APL °
2''' °
'''expressions. These are the so called USER DEFINED FUNCTIONS. They a °
re''' °
'''roughly equivalent to programs in other programming languages.''' °
X 'endd' °
*(1997 8 22 12 40 51 600) °
FTEACH5 ÉFX 'TEACH5' 'Σ Discuss negative numbers' 'exit ''TEACH5''' °
'''Earlier we did some simple arithmetic calculations.You may have not °
iced''' °
'''a curious effect when subtracting a large number from a smaller one °
:'',r' 'show ''5-12''' °
'''APL2 makes a distinction between the PROCESS of changing the sign'' °
' °
'''of a number, and the PROPERTY of numbers being less than zero.'',r' °
'show ''-2''' °
'''In this example we apply a primitive FUNCTION to the scalar 2. The' °
'' °
'''name of the function is NEGATION and its symbol - is called the MIN °
US''' °
'''sign. The result of the evaluation is a number called NEGATIVE TWO. °
''' '''The special symbol (²) is called a HIGH MINUS.'',r' °
'''High minus is NOT a function. It describes the fact that the value °
of''' °
'''the number is less than zero. The high minus should be considered t °
o''' °
'''be part of numeric notation, much the same as the usage of the (.)' °
'' °
'''period to separate the integral portion of a number from its fracti °
onal''' °
'''part. (Another example of numeric notation is the usage of the lett °
er''' °
'''E in scientific notation. The E represents a power of 10, as in 1.2 °
E2.)''' 'do' °
'''The minus symbol on the other hand IS a primitive function. It chan °
ges''' '''the sign of ALL components to the right:'',r' °
'show ''-2 ²5 7''' °
'''When you think about it, changing the sign of any number is the sam °
e''' '''as subtracting that number from zero.'',r' 'show ''0-2 ²5 7''' °
'''Any function that can be applied to ONLY its right argument has a'' °
' °
'''special name. It is called MONADIC. So what do we call functions''' °
'''that need both a left AND a right argument? We call them DYADIC.''' °
'''(Again, don''''t worry about the terminology; you will get used to °
Xit.)''' 'endd' °
*(1997 5 4 11 52 32 484) °
FTEACH6 ÉFX 'TEACH6' 'Σ Introduction to character manipulation' °
'exit ''TEACH6''' °
'''Earlier we said that there are only two types of data: numbers and' °
'' °
'''text (or more specifically characters). So far we have done some''' °
'''elementary processing of numbers. Let us now take a look at text.'' °
' °
'''Are there primitive functions to manipulate text, and if there are' °
'' '''how useful are they?''' 'do' °
'''Here is an example of a primitive function that can be used in the' °
'' '''evaluation of an expression containing text only:'',r' °
'show ''''''MISSISSIPPI''''=''''S''''''' °
'''We could just as well have written this as:'',r' °
'show ''''''S''''=''''MISSISSIPPI''''''' °
'''The result is a string of zeros and ones. The length of this string °
''' °
'''is the same as the length of the word MISSISSIPPI, and the one''''s °
''' '''correspond to the location of the letter S.''' 'do' °
'''The vector of zeros and ones is a special type of numeric data''' °
'''called BOOLEAN. A boolean zero is equivalent to the word ''''false' °
''',''' °
'''and a boolean one corresponds to the word ''''true''''. As we will °
see''' °
'''in later lessons, a boolean vector has many uses. But now, how coul °
d''' °
'''we find what letters in MISSISSIPPI are NOT S? One way would be to' °
'' '''write'',r' 'show ''1-''''S''''=''''MISSISSIPPI''''''' °
'''But there is an easier way'',r' °
'show ''''''S''''⌠''''MISSISSIPPI''''''' °
'''As you learn APL2, you will discover that there is always more than °
''' °
'''one way to solve a problem. A good way of becomming truly profficie °
nt''' °
'''in the language is to try finding at least two DISTINCT ways to sol °
ve''' '''a problem.'',r' °
'''The symbols = and ⌠ will work with numbers too'',r' °
'show ''4=1 2 3 4 5 6'' ''4⌠1 2 3 4 5 6''' °
'''These symbols belong to a group of primitive functions called''' °
'''RELATIONAL. These also include GREATER-THAN, LESS-THAN and others.' °
'' °
'''We will study these later. For now, we should point out that only t °
he''' '''= and the ⌠ work with character strings.''' 'do' °
'''Before we leave this very brief introduction to character data''' °
'''processing, let us take a look at yet another primitive function:'' °
,r' 'show ''''''ABORIGINE''''ε''''AEIOU''''''' °
'''What do you suppose this function does? Go ahead, and try ε on some °
''' '''other examples.''' °
'''(REMEMBER: Use the OPTIONS menu bar -with MODIFY KEYBOARD- to find' °
'' ''' out how to produce any given symbol!!)''' 'do' °
'''You can also use this primitive in numeric data. Try it:''' 'do' °
'''The function is called MEMBER OF, and produces a boolean vector of' °
X'' '''the same length as the LEFT argument.''' 'endd' °
*(1997 5 4 11 59 53 596) °
FTEACH7 ÉFX 'TEACH7;NUMBERS;SUPERCALIFRAGILIST;A;B;C' °
'Σ Explain the assignement arrow' 'exit ''TEACH7''' °
'''So far we have used the keyboard as if it were that of a hand''' °
'''calculator. The screen served us as a kind of memory. Indeed, it is °
''' °
'''possible to use the results of a previous calculation to continue'' °
' °
'''solving a more complex problem. To see how this could be done, try' °
'' '''the following:'',r' ''' 1. Multiply two numbers''' °
''' 2. Move the cursor to the line with the result, and then move the' °
'' ''' cursor just to the right of the last digit.''' °
''' 3. use the divide symbol followed by another number, and press ENT °
ER''' 'do' °
'''If you followed these instructions, the second expression was displ °
ayed''' °
'''below the result of the first expression, and the result of the sec °
ond''' °
'''expression was displayed below that one. You can proceed in this ma °
nner''' °
'''indefinitely. We should point out that this thechnique IS NOT part °
of''' °
'''APL2. It can be done because APL2/OS2 supports this particular type °
of''' '''editor.'',r' 'do' °
'''There is a special symbol, called the LEFT ARROW ╜ ''' °
'''This symbol is not exactly a primitive function. It is part of APL2 °
''' '''SYNTAX. This is a set of rules that describe how valid APL2''' °
'''expressions are to be generated, and how they are evaluated.'',r' °
'''When the LEFT ARROW is used, it is called an ASSIGNMENT ARROW. It i °
s''' °
'''used to send the result of an expression to a VARIABLE. The process °
''' °
'''of storing data in variables is called SPECIFICATION. Why the speci °
al''' °
'''terminology? Because there is more to this, as we will see in later °
''' '''lessons. But now let us see how it works'',r' °
'show ''NUMBERS╜1 2 3 4 5''' °
'''Note that the evaluation of this expression fails to echo the resul °
t''' °
'''on the screen. This is because the result is STORED elsewhere, name °
ly''' °
'''in a VARIABLE called NUMBERS. To obtain that result on the screen, °
we''' '''merely enter NUMBERS, and press ENTER'',r' 'show ''NUMBERS''' °
'''Data may be assigned to more than one variable (MULTIPLE SPECIFICAT °
ION)'',r' 'show ''A╜B╜C╜2 3 4'' ''A'' ''B'' ''C''' °
'''In APL2 the name of a variable can be any character string starting °
''' °
'''with a letter, and containing letters, digits, or a few aditional'' °
' °
'''special characters. (For the time being we will just stick to lette °
rs).''' °
'''There is a limit to the length of the name of a variable but it is °
so''' '''large, you do not have to worry about it:'',r' °
'show ''SUPERCALIFRAGILISTICEXPIADOCIOUS╜1234.56789''' °
'show ''SUPERCALIFRAGILISTICEXPIADOCIOUS''' °
'''The same name can be used over again, but when it is, the previousl °
y''' '''stored data are lost'',r' °
'show ''NUMBERS╜''''ONE TWO THREE FOUR FIVE'''''' ''NUMBERS''' °
'''Why don''''t you get acquainted with the assignment arrow. Enter a °
word,''' °
'''followed by the ╜. Then, following the ╜ enter any expression of th °
e''' '''kind that we have already explored.''' 'do' °
'''Now write another expression that includes your stored word.''' °
X 'endd' °
*(1997 8 22 12 43 29 524) °
FTEACH8 ÉFX 'TEACH8;NOS' 'Σ Introduce SHAPE and RESHAPE' °
'exit ''TEACH8''' °
'''Earlier we stated that a vector is composed of two parts. Do you''' °
'''remember what those parts were?''' 'non' °
'''One part was the length of the vector, and the other part was the'' °
' °
'''data. Since the length of a vector is ''''known'''' by APL2, then i °
t''' °
'''should be possible to get that information from APL2. Indeed, there °
''' °
'''is a primitive function that returns the length of a vector. It is' °
'' '''called SHAPE, and it uses the symbol µ.'',r' °
'show ''µ1 2 3 4'' ''µ''''TEXT'''''' ''NAME╜''''GEORGE'''''' ''µNAME'' °
' °
'''Shape is a monadic primitive function. It is interesting to compare °
''' °
'''the assignment statement and function shape to usage of the same''' °
'''concepts in other programming languages. In other languages it is'' °
' °
'''customary to specify the size (DIMENSION) of data in advance, even' °
'' °
'''before a code is compiled. APL2 supports not only what is called''' °
'''late binding (i.e. assigning data to a variable during execution)'' °
' °
'''but also the amount of storage that is required to hold that data.' °
'' 'do' °
'''There is an upper limit to the length of a vector, but again, it is °
''' °
'''so large that you need not be concerned with it for the time being. °
''' °
'''There is, however, another question that you may ask. why call it'' °
' °
'''shape, and not length? To answer that question, let us look at a''' °
'''DYADIC usage of the symbol µ.'',r' °
'show ''NOS╜1 2 3 4 5 6 7 8 9 10 11 12'' ''5µNOS'' ''3 4µNOS''' °
'''We stored in NOS the first 12 integers. Then we asked to display''' °
'''a vector containing the first five elements of NOS. Last, we''' °
'''asked to display NOS in 3 rows of four columns each.'',r' 'do' °
'''This dyadic usage of µ is called RESHAPE. In other words, the''' °
'''monadic form of µ (called shape) tells us how the data is''' °
'''organized in storage, and the dyadic form of µ (reshape) tells''' °
'''how to organize data in storage. Incidentally, when data are stored °
''' °
'''in rows and columns, we no longer deal with vectors. We call such'' °
' '''data ARRAYS.'',r' 'show ''µ3 4µNOS''' °
'''Here we asked to shape the contents of NOS into an array of 3 rows' °
'' °
'''and four columns, and then we asked for the shape of that array.'', °
r' °
'''There is another aspect of this last example. Do you see what it is °
?''' 'non' °
'''The evaluation proceeds from right to left! We will discuss that''' °
'''in another lesson.''' 'do' °
'''What do you suppose will happen if we ask to generate a vector, or' °
'' °
'''an array that needs more entries than what we supply in the right'' °
' '''argument?''' 'do' 'show ''2 5µ''''ONE TWO ''''''' °
'''Right, after the last element (scalar) is used up, the next one is' °
'' '''taken from the front of the vector. What about this?'',r' °
'show ''ARRAY╜2 2µ1 2 3 4''' °
'''What do you suppose will happen if we were to write: 4 4µARRAY''' °
'do' °
'''There is a lot to be said about arrays, but we will postpone that'' °
' '''discussion for another lesson. Right now we will introduce one''' °
'''final symbol, and the associated monadic and dyadic functions.''' °
X 'endd' °
*(1997 5 4 12 4 50 368) °
FTEACH9 ÉFX 'TEACH9;TEST' 'Σ Describe INDEX GENERATOR and INDEX OF' °
'exit ''TEACH9''' °
'''We have used the ordinal sequence of numbers in several examples''' °
'''so far. This sequence (counting numbers 1 2 3 4 5 ...) is so useful °
''' °
'''that there is a special primitive function for it. The symbol ∞,''' °
'''is used with a scalar integer right argument. The function is''' °
'''sometimes called INTERVAL, and sometimes INDEX GENERATOR. You may'' °
' °
'''prefer to just call it IOTA, which is the name of the Greek letter °
∞.'',r' 'show ''∞10''' °
'''Although the sequence begins with a 1, it is possible to give a spe °
cial''' °
'''command (to be learned in a later lesson) so that it starts with a °
zero.''' °
'''But even now, we should be able to begin a sequence with an arbitra °
ry''' '''value:'',r' 'show ''²1+∞5'' ''10.23+∞4''' °
'''You should even be able to generate an arbitrary arithmetic progres °
sion''' °
'''(To refresh your memory an arithmetic progression begins with some' °
'' °
'''arbitrary number, and each consecutive element equals the last one °
plus''' °
'''a constant. Here is an example: the sequence 3 7 11 15 19 ... begin °
s''' '''with a 3, and each aditional term is increased by 4):'',r' °
'show ''²1+4⌡∞5''' °
'''Just as an exercise, generate a sequence of ten numbers that begins °
''' '''with 23 and increments by 33 and store it in variable AS.''' °
'do' °
'''There is a well known story about arithmetic progressions. You may' °
'' '''display it by entering GAUSS, and pressing Enter.''' °
'AS╜²10+33⌡∞10' 'do' °
'''The monadic iota is very useful, but so is its dyadic version. When °
''' °
'''∞ is preceeded by a left argument, the primitive function is called °
''' '''INDEX OF. The operation is best described by an example:'',r' °
'show ''AS'' ''AS∞56'' ''AS∞122 188 56''' °
'''The result is the location of the right argument in the left vector °
.''' °
'''The SCALAR 56 is the second element of AS. The fourth and sixth''' °
'''values are 122 AND 188.'',r' °
'''As you can see from the example, the left argument is a vector.''' °
'''The right argument could be a scalar, a vector or even an array.'', °
r' °
'show ''ALPHA╜''''ABCDEFGHIJKLMNOPQRSTUVWXYZ'''''' ''ALPHA∞''''C'''''' °
' °
'show ''ALPHA∞''''HOUSE'''''' ''BOX╜2 3µ''''CATDOG'''''' ''BOX'' ''ALP °
HA∞BOX''' °
'''The usage of dyadic iota can be summarized in the following APL2''' °
'''terminology: The result has the same shape as the right argument,'' °
' °
'''and contains integers at most equal to ONE PLUS the shape of the''' °
'''left argument. One plus??? Where does this come from?''' 'do' °
'show ''''''AEIOU''''∞''''MISSISSIPPII''''''' °
'''The right argument (MISSISSIPPI) contains 11 letters, as does the'' °
' °
'''resulting integer vector. The left argument has five letters. The'' °
' °
'''letters in MISSISSIPPI not found in the left argument, have been''' °
X '''assigned the interger 6 (one plus 5).''' 'endd' °
*(1997 9 14 12 36 15 412) °
FTEACHER ÉFX 'TEACHER' 'Σ Instructions to teacher' °
'''The overall plan of this course is to start with simple concepts''' °
'''so that students may begin solving problems almost from the''' °
'''beginning.'',r' °
'''As lessons advance, new concepts, primitive functions, grammar and' °
'' °
'''operators are introduced. The particular sequence depends on the''' °
'''needs of the current objective. The lessons are written in a''' °
'''modular fashion. Whithin each lesson, there are functions named''' °
'''TEACH1, TEACH2, ... and so on. These functions are controlled by a' °
'' °
'''DRIVER function called TEACH. TEACH is also the latent variable in' °
'' '''the workspace.''' 'do' °
'''This modularity makes it easy to design alternate approaches to''' °
'''teaching APL2. Merely develop a workspace that controls access to'' °
' °
'''selected functions from the TEACH workspaces. Since all functions'' °
' °
'''are named TEACHn, extraction of specific functions from different'' °
' '''workspaces should be simplified.'',r' °
'''Workspace INDEX contains information about the contents of individu °
al''' °
'''functions in different workspaces. You may use function FIND to fin °
d''' °
'''discussions on specific subjects. Function CONTENTS is a table of'' °
' °
'''contents of all lessons. Function RULES summarizes rules given in t °
he''' '''lessons.'',r' °
'''On that point, the concept of rules is designed to focus on importa °
nt''' °
'''aspects of APL2. The basic idea is much like highligting in a textb °
ook.''' °
'''Note also that some lessons contain functions with names other than °
''' °
'''TEACHn. These are not considered vital to the course, but may be''' °
'''useful to some students in pursuing further detail. Some of these'' °
' °
'''functions deal with historical evolution of mathematical concepts,' °
'' °
'''while others provide a more general background, or more specific''' °
'''examples.'',r' °
'''NOTE: If you use the ")IN .. INDEX" command, follow this by enterin °
g''' ''' lx''' 'do' °
'''Finally, each lesson begins with a brief review of the material''' °
'''covered in the previous lesson. This course was designed primarily' °
'' °
'''for self study. In a course given to a large class, portions of''' °
'''the material could be projected on the screen. Any feedback on the' °
'' '''the effectiveness of the TEACHn workspaces would be greatly''' °
'''appreciated. Please mail your comments to:'',r' °
''' Zdenek V. Jizba''' °
''' 1341 Rebecca Drive''' °
''' La Habra, CA 90631''' °
X '''e-mail: jizba@kaiwan.com''' '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]' °
*(1996 4 6 15 55 24 480) °
XFaq ÉFX 'U╜aq W' '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' °
*(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 9 9 13 0 45 372) °
Fdisclaimer ÉFX 'disclaimer' 'Σ Copyright statement' °
'(10µ'' ''),''Copyright, Z. V. Jizba, 1995,1996,1997'',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 °
of''' '''these tutorials.'',r' ''' ACKNOWLEDGEMENTS'',r' °
''' In writing these tutorials, I am greatly indebted to Roy Sykes, wh °
ose''' °
'''excellent lectures increased my understanding of the language.''' °
'''Discussions with the late Harry Bertucelli clarified a number of''' °
'''concepts and caused me to change some improper terminology that was °
''' °
'''used in previous versions of these tutorials. Mr. Benjamin Archer'' °
' °
'''kindly checked out a nearly final version, bringing to my attention °
''' '''some ommisions, misspellings, and invalid terminology.'',r' °
X '''(PRESS ENTER to continue)''' °
*(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 9 9 12 50 14 444) °
Fendd ÉFX 'endd' 'Σ end of special feature' '20µ''²'' ╪ ╕(4<µÉLC)/0' °
X 'do' °
*(1997 9 14 12 59 18 516) °
Ferase ÉFX °
'erase;t;EXIT;HELP;KEYS;DISPLAY;GAUSS;KEYBOARD;TEACHER;DISCLAIMER;GO' °
'Σ Erase all global functions and variables' '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 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 '╕' °
*(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╜''''''''' °
*(1997 8 24 12 13 16 360) °
Finitialize ÉFX 'initialize;T' 'Σ Initialize workspace' °
'''AT ALL TIMES, TO CONTINUE, PRESS RETURN!'',r' °
'''To see disclaimers enter:'',r,'' disclaimer''' 'do' 'erase' °
'globals' °
'''Make sure the CAP LOCK light on your keyboard (upper right) is ON!' °
'' °
''' (PRESS SEVERAL TIMES ON THE CAPS LOCK KEY AND NOTE THE CAPS LOC °
K''' ''' LIGHT GO ON AND OFF. STOP WHEN THIS LIGHT 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' °
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' °
XCuc 1 26 ABCDEFGHIJKLMNOPQRSTUVWXYZ °