Not strange at all; you have defined a fork.

Henry Rich

On 10/30/2011 12:17 PM, Björn Helgason wrote:

> I tried to use 3 and it is a bit strange
>
>        a=.(3 : 0) ; (3 : 0)
> 2+3
> )
> y+4
> )
>     a
> 3 : 'y+4' ; 3 : '2+3'
>     a 44
> ┌──┬─┐
> │48│5│
> └──┴─┘
>
>
> 2011/10/30 Henry Rich<[email protected]>
>
>> Not really a nested definition, but a sequential one.  When the
>> interpreter sees x : 0, it drops what it's doing and reads lines from
>> the input.  When it finds ), it resumes what it was doing.
>>
>>     (0 : 0) ; (0 : 0)
>> line 1
>> )
>> line 2
>> line 3
>> )
>> ┌──────────────┬───────┐
>> │line 2 line 3 │line 1 │
>> └──────────────┴───────┘
>>
>> Henry Rich
>>
>> On 10/30/2011 9:11 AM, Brian Schott wrote:
>>> Ric,
>>>
>>> Thank you for posting these links. In the first link is a verb named
>>> parameterizedVerb_ddp_ and an adverb name defn_ddp_ created by Dan in
>>>
>> http://www.jsoftware.com/svn/DanBron/trunk/environment/parameterized_verbs.ijs
>>> . It looks to me as if Dan has found a way to nest two explicit
>>> definitions there because at that link under the section "EXAMPLE
>>> SECTION", the verb parameterizedVerb has two separate line beginning
>>> with a single paren.
>>>
>>> Could someone verify that this is or is not a nested definition and if
>>> so explain how it is done, please?
>>>
>>> On Sun, Oct 30, 2011 at 1:18 AM, Ric Sherlock<[email protected]>   wrote:
>>>>
>>>> http://www.jsoftware.com/jwiki/Guides/Multiple%20Verb%20Arguments
>>>> http://www.jsoftware.com/jwiki/Guides/Defining%20Verbs
>>>
>> ----------------------------------------------------------------------
>> 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