Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!usc!jarthur!uunet!mcsun!ukc!cam-cl!news From: bdb@cl.cam.ac.uk (Brian Brunswick) Newsgroups: comp.lang.icon Subject: Multiple value assignment in icon??? Message-ID: <1991Mar13.180536.22613@cl.cam.ac.uk> Date: 13 Mar 91 18:05:36 GMT Reply-To: bdb@cl.cam.ac.uk (Brian Brunswick) Organization: U of Cambridge Comp Lab, UK Lines: 25 I am fairly new to icon, but am considering thr pros and cons of writing a medium size project using it. I came up with a language feature that I have found useful in the past, namely returning a fixed small number of distinct values from a procedure and assigning them to separate variables, and wondered what the particular idiom might be. That was where the trouble began. Something like every (x|y):=f() is no good, of course. I fiddled about, and eventually came up with using this: every z:=:y:=:x:=:r123() where r123 would do suspend ![1|2|3] and ends up with x=1, y=2, z=3 Note the reversed order of xyz. Now this is a horrible cludge, it seems to me. Am I missing something, or does this irritation spoil an otherwise pretty language? Brian.Brunswick@uk.ac.cam.cl Disclaimer. Short sig rules!