In the few places where I had local nouns named x and/or y, I changed them to xx and yy. My global nouns always had longer names.
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Cliff Reiter Sent: Saturday, September 16, 2006 08:45 To: General forum Subject: [Jgeneral] image3 addon & 601 style I have taken a peek at the image3 addon under J601 and 90% of things work and many users woulld be able to use it as is -- some minor changes are needed to get the labs working and then 99% of things work. Still, some more subtle things go wrong and I need to spend more time before offering a first J601 version of the scripts which I would like to do soon. Since I use the image addon everyday, and I have J things I want to write about and scripts I want to share, it makes sense to try to move to J601 quickly. However, I also hope to take a more leisurely look at the scripts and move them to J601 style in a more substantial revision later. The image addon is only one of many large things I will need to move over, but it is the top priority, and here is my first peek at the more substantial move over to 601. The addon is almost 4000 J lines organized into 14 scripts. A quick search for LF,'x=.' etc led to a couple dozen suspect places. First was a function in color_spaces.ijs that had a suspect x=. (I haven't looked further) NB. contrast expansion NB. using optimal contrast con_exp=:3 : 0 'y u v'=.0 1|:RGB_to_yuv y. cft=.+/\(%+/) freq_tab to255 y x=.(i.%])256 y=.(x;cft)pw_lin y yuv_to_RGB 0|:y,u,:v ) Now that I see it, the function also had three hidden y=., u=. v=. discouraged assignments. What would be the encouraged style for rewritting the function for J601? It works as is, I could just change y. to y, but then I use y for two different meanings on the first line which I usually avoid, or I could rename y u v and x, but it seems kind of strange to avoid y u v as variable names in yuv color space. I know there is no correct answer to my query -- since it involves style, but I really do want to know what others think. Best, Cliff -- Clifford A. Reiter Mathematics Department, Lafayette College Easton, PA 18042 USA, 610-330-5277 http://www.lafayette.edu/~reiterc ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
