Hi Elias, The behavior seems to be that localized ⎕ variables inherit the value they had in the outer context unless you change them. If you do change them, they get their old value back when you exit the function in which they were localized.
As far as I can tell, you can't expunge them, so they are never undefined. This differs a bit from APL2, but should interoperate with existing code. Regards, Mike On Thu, Aug 20, 2015 at 3:37 AM, Elias Mårtenson <[email protected]> wrote: > ⎕CT is never looked up as a normal variable. Internally it's using the > value of Workspace::get_CT() (check the source file Workspace.hh). > > Setting the value of the "variable" ⎕CT will simply change this value. > > Regards, > Elias > > On 20 August 2015 at 10:41, Mike Duvos <[email protected]> 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?] >> >> >> >
