home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / apl / 1369 < prev    next >
Encoding:
Text File  |  1993-01-24  |  1.2 KB  |  48 lines

  1. Newsgroups: comp.lang.apl
  2. Path: sparky!uunet!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!yale!gumby!ursa!ursa!abalje47
  3. From: abalje47@ursa.calvin.edu (Alan Baljeu)
  4. Subject: $: (self-reference) difficulties
  5. Message-ID: <abalje47.727925543@ursa>
  6. Keywords: J
  7. Sender: news@calvin.edu
  8. Organization: Calvin College
  9. Date: Mon, 25 Jan 1993 01:32:23 GMT
  10. Lines: 36
  11.  
  12. J6   Copyright (c) 1990-1992, Iverson Software Inc.  All Rights Reserved.
  13.  
  14.     NB. The following four lines were copied (cut and paste) from
  15.     NB. tut19.js which I got at watserv1.waterloo.edu from the file
  16.     NB. /languages/apl/j/tutorial.tar.  It was placed there in March,
  17.     NB. while the executable arrived in October '92
  18.  
  19.    a=. '$.=. 2-0=y.' ; '1'
  20.    b=. 'y. * $: y.-1'
  21.    factorial=. (a,<b) : ''
  22.    factorial 5
  23. limit error
  24. [2] y. * $: y.-1
  25.     NB. The above is my problem
  26.    factorial
  27. +------------+-++
  28. |$.=. 2-0=y. |:||
  29. |1           | ||
  30. |y. * $: y.-1| ||
  31. +------------+-++
  32.     NB. A simplified example:
  33.    b =. '$:0'
  34.    test =. (a,<b) : ''
  35.    test
  36. +-----------+-++
  37. |$.=. 2-0=y.|:||
  38. |1          | ||
  39. |$:0        | ||
  40. +-----------+-++
  41.    test 2
  42. limit error
  43. [2] $:0        
  44.    NB. okay, so what's wrong with $: ?  
  45. --
  46.             Alan Baljeu
  47. This signature is.
  48.