multiline locals definition with assignment?
Forum rules
This forum is for general chit-chat, not necessarily APL-related. However, it's not for spam or for offensive or illegal comments.
This forum is for general chit-chat, not necessarily APL-related. However, it's not for spam or for offensive or illegal comments.
3 posts
• Page 1 of 1
multiline locals definition with assignment?
Any reason not to allow default values like Classes do?
testFoo rArg
;one;two
;three
;default ← 0
;notDefault ← 1
⎕← 'output'
-
norbertjurkiewicz84 - Posts: 62
- Joined: Mon Nov 01, 2010 7:26 pm
Re: multiline locals definition with assignment?
Does the monadic ; work like ⎕shadow?
Can you pare down the example:
. remove rarg,
. pass output as a result,
Can you pare down the example:
. remove rarg,
. pass output as a result,
- ArrayMac227
- Posts: 62
- Joined: Sat Sep 12, 2015 1:40 pm
Re: multiline locals definition with assignment?
There is no primitive called monadic ;. It is just that functions can "continue" the header line [0] on subsequent lines before any actual code.
This means that all locals, even those declared after line [0] are localised upon entry into the function, unlike ⎕SHADOW which dynamically localises when executed, adding an additional stack frame to do so.
Full documentation is available at https://help.dyalog.com/17.1/Content/La ... 0Lines.htm
This means that all locals, even those declared after line [0] are localised upon entry into the function, unlike ⎕SHADOW which dynamically localises when executed, adding an additional stack frame to do so.
Full documentation is available at https://help.dyalog.com/17.1/Content/La ... 0Lines.htm
-
Adam|Dyalog - Posts: 143
- Joined: Thu Jun 25, 2015 1:13 pm
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 0 guests
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group