[Jprogramming] Tacit form: Where to put the start value..?

Henry Rich henryhrich at gmail.com
Thu Aug 9 13:54:13 UTC 2018


It comes down to

    +:&0 b. _1
|domain error
|       +:&0 b._1

Henry Rich

On 8/9/2018 9:45 AM, Martin Kreuzer wrote:
> On this machine
>
>    JVERSION
> Engine: j805/j32/windows
> Release: commercial/2016-12-11T08:03:59
> Library: 8.05.10
> Platform: Win 32
> Installer: J805 install
> InstallPath: e:/program files (non-sys)/j805
> Contact: www.jsoftware.com
>
> and as well
>
>    JVERSION
> Engine: j807/j32/windows
> Beta-g: commercial/2018-07-02T18:12:05
> Library: 8.07.16
> Platform: Win 32
> Installer: J807 install
> InstallPath: e:/program files (non-sys)/j807
> Contact: www.jsoftware.com
>
> -M
>
> At 2018-08-09 12:38, you wrote:
>
>> There was no warning that negative numbers were not allowed.
>> Especially considering that the "equivalent" phrase accommodates a 
>> negative
>> number.
>>
>>    +:^:_5 (1)
>>
>> 0.03125
>>    _5(+:@[&0)1
>> |domain error
>> |   _5    (+:@[&0)1
>>
>>
>> http://www.jsoftware.com/help/dictionary/d630n.htm
>>    JVERSION
>> Engine: j807/j64/darwin
>> Beta-f: commercial/2018-06-28T12:14:57
>> Library: 8.07.16
>> Platform: Darwin 64
>> Installer: J807 install
>> InstallPath: /users/brian/j64-807
>> Contact: www.jsoftware.com
>>
>>
>> On Thu, Aug 9, 2018 at 6:03 AM, Martin Kreuzer <info at airkreuzer.com> 
>> wrote:
>>
>> > ** Brian
>>
>> > Took your hint and managed to put together a named verb which does 
>> work
>> > even for lists
>>
>> >    p=. 13 : '1(+:@[&0)~y'
>> >    p i.5
>> > 1 2 4 8 16
>> >    pt=. 1 (+:@[&0)~ ]
>> >    pt i.5
>> > 1 2 4 8 16
>>
>> > but for some reason not for negative arguments ..
>>
>> >    p -i.5
>> > |domain error: p
>> > |       p-i.5
>>
>> > -M
>>
>>
>>
>> > --
>> (B=)
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm


---
This email has been checked for viruses by AVG.
https://www.avg.com



More information about the Programming mailing list