See previous threads for [["J In A Day" --crits please]] in the General & Chat 
forums.

Some more feedback on the article and the latest calc.ijs.

================================================================
Article
================================================================

== A simple, yet non-trivial, application ==
* The paragraph starting "The calculator is so elementary ..." can probably 
just be deleted now.

* The calc_cancel_button is mentioned but is no longer in the calc.ijs script 
(the button was redundant).

I'd be tempted to get the user to put the script in the ~temp folder rather 
than the ~user folder.

== Handlers: closing the app's main form ==
* calc_cancel_button is mentioned again but no longer in script.

* do handlers "ignore their arguments"? Or is it that they are only given the 
argument '' by the gui - which typically is not very useful to use in the 
handler? Pedantic perhaps? 
 
* definition of calc_close - I'd tend to add a space between :: and 0: just to 
make it easier for readers to correctly identify the primitives.

== A simple monadic verb: eval ==
* The control-word return. is no longer used in the definition of decimal in 
the script.

== How to offer a parameter to a handler ==
* If the above section about handlers ignoring their arguments gets changed 
then this will need some changes too.

* "we use a predefined verb: bind to ..." should perhaps become "we use a 
predefined word: bind to ... "

== Writing an ambivalent verb ==

Here are a couple of alternative examples where using dyadic rather than 
monadic ". is desirable (not sure if they're preferable to your current one):
   ". '123 -456'
_333
   ". '123 -456 4.4e-3'
|ill-formed number
|       ".'123 -456 4.4e-3'
   0 ". '123 -456 4.4e-3'
123 _456 0.0044
   

== The locales: base, z, j ==
Might be worthwhile mentioning how to check which locale is current (i.e. 
coname '' )

Also might be worth adding a link to 
http://www.jsoftware.com/jwiki/Studio/Locales
for those who want more info on locales/copaths etc. (and mention the Object 
Oriented Programming lab for those that want more info on OO ?)

================================================================
Script
================================================================

* The labels for the divid and times controls. I'd suggest either using '/' and 
'*' or ' ÷' and '×' rather than '/' and 'x'

* I think it is only negative exponent formats that cause problems? If so then 
the following would still allow large numbers:
if. +./ 'e_' E. z do. z=. ,'0' end.   NB. kill negative scientific format

I don't think this problem is solved by (,8!:2) - you'll still get "ill-formed 
number" error when you try to do something with a negative exponent: 
0.000000001 + 0.000000001 = +

To solve this you need to change eval to use dyadic ".  which correctly 
interprets say '99e-4'

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to