home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / apl / 1180 < prev    next >
Encoding:
Text File  |  1992-11-16  |  2.7 KB  |  64 lines

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