bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-apl] Localizing ⎕CT


From: Juergen Sauermann
Subject: Re: [Bug-apl] Localizing ⎕CT
Date: Fri, 21 Aug 2015 12:04:07 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

Hi Mike,

this is a GNU APL feature. Instead of leaving ⎕-variables undefined
and raising the according error when referenced, GNU APL sets them
to their default values when they are being localized.

As a consequence, most ⎕-variables are always defined, which, in turn
makes the APL implementation much simpler because you save all tests
if this or that ⎕-variable is defined.

/// Jürgen


On 08/20/2015 04:41 AM, Mike Duvos wrote:
       A∘.=A←100-⎕CT×⍳10

1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1

[10 items, all tolerantly equal]

      ∇BLAH;⎕CT
[1]   A∘.=A
[2]   ∇
 

      BLAH
1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1

[ ⎕CT has been localized,and not assigned a value.This should produce ⎕CT ERROR.  What on earth is it using for
⎕CT inside the function?]




reply via email to

[Prev in Thread] Current Thread [Next in Thread]