home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.apl
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!torn!watserv2.uwaterloo.ca!watserv1!FZC@CU.NIH.GOV
- From: "Paul Robinson" <FZC@CU.NIH.GOV>
- Subject: What is an APL language?
- Message-ID: <BxsL3r.EG@watserv1.uwaterloo.ca>
- Sender: daemon@watserv1.uwaterloo.ca
- Reply-To: TDARCOS@MCIMAIL.COM
- Organization: University of Waterloo
- Date: Mon, 16 Nov 1992 04:40:52 GMT
- Lines: 52
-
- A user on Dick Holt's BBS\APL was involved with something
- else which used the initials A-P-L and thought it was
- something else, the thing he is dealing with. So that user
- asked a question which I thought I'd pass on to the
- community and have them take a look at my response. Please
- send all comments, responses and death threats to my regular
- mailbox, TDARCOS@MCIMAIL.COM or I may be flamed directly
- by calling the BBS\APL at +1 301 384 3672 and sending a
- message to Paul Robinson.
- ---
-
- >What is an apl language?
-
- Do you have a few years to spare? :)
-
- APL is a language like no other except maybe Forth, but even that isn't
- close because APL is not a religion (although some of its fanatics might
- disagree), and because it doesn't really use words except for user-defined
- symbols.
-
- APL is a language that uses a special keyboard with new symbols which are
- not available except through redefining the standard keyboard. The
- language does two things differently from anything else. First, most
- operations are done with a single symbol or two symbols, and the language
- is evaluated from right to left like Chinese or Hebrew, as opposed to
- left-to-right like all "Western" readable languages.
-
- One example of the power (or complexity) of the language is the means to
- sum a list of numbers. For example, in any other language, if I wanted
- the variable A to have the average of a list of 20 numbers, I'd have to
- do a loop. Here's how it's done with APL:
-
- a <- +/ 10 34 14 12 22 66 99 44 11 21 94
-
- (and so on) This gives the "average" or "mean" of the numbers.
- Try doing that with less than a loop and a set of data
- statements or arrays, and so on. Also, the <- in APL is the
- assignment symbol, a single character, something similar to the
- way Pascal uses := to assign values. Note that this character
- <- is NOT the same as = which is available in APL and is used
- the way Pascal uses the = sign, to test for equality, NOT to assign
- a value to avariable.
-
- APL does have it's faults. The fact that the language uses a special
- character set can cause problems; the fact the language has to be "read"
- from right to left to understand it, makes it a little harder to
- understand what is to be done, when you are "used" to doing it the other
- way in every other language.
- ---
- Paul Robinson -- TDARCOS@MCIMAIL.COM
- These opinions are mine alone
-
-