Path: ...!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Lars Poulsen Newsgroups: comp.os.vms Subject: Re: New VSI post on Youtube Date: Sat, 24 Aug 2024 14:50:51 -0700 Organization: AfarCommunications Inc Lines: 20 Message-ID: References: <66bcf876$0$717$14726298@news.sunsite.dk> <66bcfbe3$0$717$14726298@news.sunsite.dk> <66c397f6$0$716$14726298@news.sunsite.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Sat, 24 Aug 2024 23:50:52 +0200 (CEST) Injection-Info: dont-email.me; posting-host="f18d1a49834d4e2626ae347ea2abf4e1"; logging-data="1634479"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19lGyNDZTry+zgpfIpmUWvjXvrjhUV9oXI=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:j95ch2H69z6vKSReZGKLdXMBrUY= Content-Language: en-US In-Reply-To: Bytes: 2281 > On 8/20/2024 8:36 AM, Simon Clubley wrote: >> One thing I wish was available in all languages is the ability to return >> multiple values from a function call so you can return both a status and >> the value(s) in one assignment. Ie: "a, b, c = demo_function(param1, >> param2);". >> >> In languages with dynamic associative arrays (such as PHP), I simulate >> this by returning an associative array from a function call with both >> status and value fields. Makes coding _so_ much cleaner and robust. On 8/20/2024 6:47 AM, Arne Vajhøj wrote: > Few languages support multiple return values. > > And a few other languages support tuples with named fields > or anonymous classes with named properties, which is almost as good. > > And almost all newer high level languages support > map/dictionary/associative array. This is one of the many reasons I like PERL.