[Jprogramming] Domain errors with j701

David Vaughan purpleblues13 at googlemail.com
Wed Jul 6 21:01:32 HKT 2011


Hmm, this is contrary to examples I have seen. Is it new in the language? In the language references, for example in re !: section, it says to do this for execution time:
   6!:2 y
It doesn't say you need the single quotes. An I missing something or do the help pages need updating?

Thanks for your help. 
___________________________

David Vaughan

On 6 Jul 2011, at 13:29, Don Guinn <donguinn at gmail.com> wrote:

> Monadic ;: takes literal arguments. Convert the results to character.
>   ;: ": 1 2 3 + 4 5 6
> +-----+
> |5 7 9|
> +-----+
> 
> It boxes J words or tokens, close, but not quite English words. In this case
> "1 2 3" is a single word in J.
>   ;: 'The result is ' , ": 1 2 3 + 4 5 6
> +---+------+--+-----+
> |The|result|is|5 7 9|
> +---+------+--+-----+
> 
> 6!:2 executes literals. Put the calculation in quotes.
>   6!:2 'p:1000000'
> 0.000152044
> 
> On Wed, Jul 6, 2011 at 4:10 AM, David Vaughan
> <purpleblues13 at googlemail.com>wrote:
> 
>> Hi,
>> 
>> I'm new to J and just installed the 7.01 64-bit MAC version, and a lot of
>> commands are working, but some are giving me domain errors, even though I'm
>> copying the sentences from one of the books.
>> 
>> Some examples that give me a domain error:
>>  ;: 1 2 3 + 4 5 6
>> 
>> As I understand it, that should put all the words into boxes.
>> 
>> Another example is the time stuff:
>>  6!:2 p:1000000
>> 
>> Do I need to change some paths of things, or is my install corrupt/this
>> particular version broken?
>> 
>> Thanks in advance.
>> ___________________________
>> 
>> David Vaughan
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>> 
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm


More information about the Programming mailing list