bug-apl
[Top][All Lists]
Advanced

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

[Bug-apl] assignment to many variables


From: alexweiner
Subject: [Bug-apl] assignment to many variables
Date: Wed, 10 Feb 2016 19:27:44 -0700
User-agent: Workspace Webmail 5.16.5

Hi Bug-APL,
In the context of passing many variables to a function,
I am worried that I am going to forget the parenthesis, since its a really subtle thing:
      (a b)←1 2
      a
1
      b
2
      a b←1 2
 1  1 2
      a
1
      b
1 2


Also here, I find binding strength a bit misleading, since the correctly parenthesis'd version correctly throws an error, but the incorrect version passes an 'unanticipated' value if a is previously defined. If 'a' does not exist then an error is also correctly thrown:
      a b←1 2 3
 1  1 2 3
      a
1
      b
1 2 3
 
      ⎕ex'a'
1
      a b←1 2 3
VALUE ERROR
      a b←1 2 3
      ^


I don't think any change is necessary in GNU APL.  I'm just wondering if there are different approaches to passing many variables to a function. Any suggestions?

-Alex

reply via email to

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