I am puzzled: nn=: /:~ ~. ACNR
is supposed to be sorted. The monad /:~ sorts and the monad ~. finds the nub. Why were you surprised? The line UNIACNR=: (~:ACNR )#ACNR can be written more concisely as: UNIACNR=: ~.ACNR ----- Original Message ----- From: Björn Helgason <[EMAIL PROTECTED]> Date: Wednesday, April 11, 2007 10:20 am Subject: [Jprogramming] programming blunder > NB. I spent most of the day chasing a phantom and I had no idea > what was > going on > > NB. I had a set of numbers I needed to block together, count and > use to get > at other info to calculate together > > ACNR=:,".>l# "1 GOGNDCM > > NB. used it to decrease the database as well > > MINNIGOGN=: (~:ACNR )# MINNIGOGN > > NB. way down in the script > ..... > > NB. I needed to get the unique numbers to work with > > nn=:/:~~.ACNR > > NB. this worked fine for a while until yesterday the results > looked a bit > strange > NB. took me awhile to discover that the data I was now working on - > from > 1448 files and several hours of processing - that > NB. this nn was SORTED! - the rest of the data was not > NB. innocent little line I was not even looking at while tracing the > application > NB. the name not very telling either but as it had worked from the > time I > was testing it a while back I was not even thinking about it > > NB. the solution is pretty obvious once I realized what I had done > UNIACNR=: (~:ACNR )#ACNR ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
