You might consider to illustrate a multiple assignment and save two lines as 
well,

'MESSAGE TIMER_INTERVAL DIRECTION'=: 'Hello World! ' ; (0.5 * 1000) ; 1  NB. 
Text ; Milliseconds ; Right Direction

I would even rename a noun to make it clearer,

'MESSAGE TIMER DIRECTION'=: 'Hello World! ' ; (0.5 * 1000) ; 1  NB. Text ; 
Milliseconds ; Right Direction





________________________________
From: Dan Bron <[email protected]>
To: Programming forum <[email protected]>
Sent: Thu, December 10, 2009 7:41:43 AM
Subject: Re: [Jprogramming] Basic animation in J

Ian suggested:
>  Condense some verbs to one-liners, with no space between, like this:
>  
>      anim_isi_mbldown=: 3 : 'DIRECTION=: -DIRECTION'
>      anim_close=: 3 : 'wd ''timer 0; pclose; reset;'''

I've incorporated this suggestion now, too, and you're right, it's much
shorter.  And frankly, I find it easier to read, because all the interesting
parts are together in a single, 4-line block in the center of the script,
and all the ancillary housekeeping is elsewhere.

I really do think these stylistic changes have improved the solution, if
only because this version is short enough for someone to give it his
attention (the likely response to my original version would be TL;DR).
Thanks to everyone.

-Dan

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

Reply via email to