I just had the following session in J 6.02:
require 'socket'
coinsert 'jsocket'
]a=:>sdcheck sdsocket''
19
sdcheck sdconnect a;2;'127.0.0.1';80
|domain error: connectJ
| rc0 connectJ(>{.y);(sockaddr_in y);sockaddr_in_sz
sdcheck sdconnect 19;2;'127.0.0.1';80
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|
+--+-+---------+--+
The blank line after the final call to sdconnect indicates that it
completed successfully.
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?
I hesitate to declare this a bug, but it does seem rather odd; if
there's a quirk or something here that I'm missing, I'd appreciate it
if someone could explain.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm