Raul Miller wrote: > I often wish that I had an adverb which would let me index beyond > array boundaries (getting fill elements). I expect that this would > also work on verbs based on intervals (such as dyads using \ and some > dyads using ;.), extending their boundaries in a reasonable fashion. > > In particular, I would like a mechanism for ;._3 to extend off the > edges of an array. But I often want this to go in both directions, so > maybe instead I should be wanting a ;._30, or whatever? > > Does anyone else have any thoughts on this sort of boundary condition issue? > > Thanks, > > The idea that there should be a Data Type of "no data present" has plagued me since the early days of APL. I occasionally used negative numbers in a data field where non negative numbers were expected. Other ploys have been to use flag data fields [I'm ashamed to say]. I am not familiar with any formal technique for filling a data space with elements DEFINED as undefined rather than zero or blank or other kludges.
Your problem ... indexing beyond array boundaries while producing presumably undefined "fill" elements sounds much like my olde proposal. Also we must all remember the dreadful error of very not carefully monitoring the /range/ of array indices when interpreting [and executing] code so as to prevent system compromise. Jim ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
