Anthony,

Same technique inside a verb (=an explicit verb definition).
If you don't prefix with smoutput then the value you calculate will just be
lost (unless it's the last value calculated before the verb exits,
whereupon it will become the returned value.)

If you know APL, you may find the following link instructive:
http://www.jsoftware.com/jwiki/APL2JPhraseBook


On Wed, Apr 10, 2013 at 7:05 PM, Ian Clark <[email protected]> wrote:

> How about writing at the top of your script:
>
> smoutput 6!:0 ''
>
> ...not in a verb or anything, just bare.
>
> I'll leave you to add further data you want, by looking up:
> http://jsoftware.com/help/dictionary/xmain.htm
>
> You can add boilerplate text like this:
> smoutput 'The timestamp is: ' , ": 6!:0 ''
>
>
>
> On Wed, Apr 10, 2013 at 6:49 PM, Anthony O'Malley <[email protected]> wrote:
>
>> Greetings all.
>>
>> I have searched a lot before posting this (including "Learning J",
>> "Primer", etc.).
>>
>> I want to have a character string display when a script loads that
>> provides information to the script user. E.g., 'F is a dyadic verb, right
>> arg date1, left arg date2, both dates single numeric ddmmyyyy.'
>>
>> In APL I used to do this with quadLX (latent expression) which displayed
>> when the workspace was loaded.
>>
>> But no matter what I do in a script--mention 'string', OR
>> banner=:'string' (then mention banner on next line), OR define an explicit
>> verb banner=: 0 : 0 (and then call banner)--the 'string' will not display
>> when the script is loaded (as with quadLX).
>>
>> I just can't spend any more time experimenting. There's a trick to this
>> in J. Can anyone provide any help with this simple problem?
>>
>> Best, Tony
>> ------------------------------**------------------------------**
>> ----------
>> For information about J forums see 
>> http://www.jsoftware.com/**forums.htm<http://www.jsoftware.com/forums.htm>
>>
>
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to