Page 1 of 1
multiline locals definition with assignment?
Posted: Thu Jul 25, 2019 2:18 pm
by norbertjurkiewicz84
Any reason not to allow default values like Classes do?
testFoo rArg
;one;two
;three
;default ← 0
;notDefault ← 1
⎕← 'output'
Re: multiline locals definition with assignment?
Posted: Mon Sep 09, 2019 2:31 pm
by ArrayMac227
Does the monadic ; work like ⎕shadow?
Can you pare down the example:
. remove rarg,
. pass output as a result,
Re: multiline locals definition with assignment?
Posted: Sun Sep 15, 2019 12:06 pm
by Adam|Dyalog
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