mar, 23 Mar 2010, Sprague, Webb (OFM) skribis:
> Hi all,
> 
> Forgive my newbieness,... but what does the following snippet mean (from
> some J code that it is now my responsibility to maintain):
> 
> if.  rtn e.<'NO'  do.
> 
> I understand "if." And "do.", just not the part in the middle; I assume
> it has something to do with testing for equalituy.  "rtn" is the value
> given by a window interface thingy.
> 
> On a related note, I would like to print a string with the value of
> return and some text concatenated to it, but the following snippet gives
> me a "domain error"
> 
> 'return value:', rtn 1!:2(2)
> 
> I think rtn might be boxed, or something, but I can't figure it out.  If
> it were a C-ish language, I would be writing "printf("return value: %s",
> rtn);". 
> 
> Finally, if there is a way to unbox a variable, it would be great to
> hear about it.

Excuse me for my frankness, you seems know nothing about J, but you
are responsible for maintaining some J codes. I strongly suggest you
to spend some time on learning J before browsing your maintained
source codes because knowledge of other programming languages cannot
be extrapolated to J.

for the other question, I guess it should be
('return value:', >rtn) 1!:2(2)

-- 
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to