Why? Is this accomplishing anything ? Is the value of t changed?
t=:1 2 3
t+3 or 3+t give 4 5 6 but t is not changed
to have a change in t then t=:t+3 works and its meaning is clear.
I would suggest that the value of J (as with APL) is that it is not C
and non-C thinking is a benefit.
Don Kelly
On 2017-07-04 10:55 AM, 'Mike Day' via Programming wrote:
Not multiple assignment, but copula-related.
I've often wondered why J doesn't have the C family feature of
assignments
such as
t =: 1 2 3
[t+=: 3
4 5 6
I don't know what it's called, and I realise it's only an arguably
attractive
feature, not an essential one, but would be useful, especially when
translating
(or plagiarising) to J from C-like code.
John Scholes et al managed to include it in Dyalog APL many years
ago; it's
in his "dfns" (dynamic functions, I think) as well as their more
conventional
APL functions and session operations. If I recall correctly, John
spells out rules
for passing values to variables of local scope within dfns using such
operators.
Dyalog doesn't have constructs like t++, though.
Thanks,
Mike
On 04/07/2017 06:40, HenryRich wrote:
Here is a feature that I have wanted for a long time:
http://code.jsoftware.com/wiki/System/Interpreter/Requests#Expanded_Multiple_Assignment
It attempts to solve the problem of moving verb arguments into
variable-names. Allows defaults and multilevel arguments. I will
implement this within a month or so, so get your comments in ASAP.
Henry Rich
---
This email has been checked for viruses by AVG.
http://www.avg.com
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm