[fpc-devel] Proposal: Multiple assignments

Alexander Klenin klenin at gmail.com
Fri Aug 6 15:33:54 CEST 2010


On Sat, Aug 7, 2010 at 00:12, Marcos Douglas <md at delfire.net> wrote:
> On Fri, Aug 6, 2010 at 7:12 AM, Alexander Klenin <klenin at gmail.com> wrote:
>>
>> On Fri, Aug 6, 2010 at 18:18, Michael Schnell <mschnell at lumino.de> wrote:
>>
>> > a, b := myfunc(x);
>> >
>> > I felt that this makes some sense, but
>>
>> Agree, especially combined with built-in "dummy" variable,
>> so you can do
>> (_, _, a, _, b) := FuncWithManyOutputs(x);
>> to get only some of outputs.
>
> It sounds like Lua language, look:
> http://www.lua.org/manual/5.1/manual.html#2.4.3

It also sounds like Python, Perl, Haskell, Prolog... basically every language
except Pascal family and C ;-)

-- 
Alexander S. Klenin



More information about the fpc-devel mailing list