Thanks, I've got it working now. I believe I've encountered this before, where J has the same visual representation for different types of data. I'll have to remember from now on that a vector with one element is *not* a scalar!
On Sat, Jun 13, 2009 at 9:31 PM, Sherlock, Ric<[email protected]> wrote: >> From: Jimmy Miller >> >> I just had the following session in J 6.02: >> >> a;2;'127.0.0.1';80 >> +--+-+---------+--+ >> |19|2|127.0.0.1|80| >> +--+-+---------+--+ >> 19;2;'127.0.0.1';80 >> +--+-+---------+--+ >> |19|2|127.0.0.1|80| >> +--+-+---------+--+ >> >> Now, my question is, given that sdconnect was passed the exact same >> argument in both calls, why did it give an error on the first one, and >> not the second? Why does the use of the variable name have anything >> to do with it? > > Because although the argument appears to be the same they aren't. > #$19 > 0 > #$a > 1 > > In other words, 19 is atomic (rank 0) whereas a is a one item list. > So this should work: > sdcheck sdconnect ({.a);2;'127.0.0.1';80 > > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
