View Single Post

   
  #3 (permalink)  
Old 04-12-2008, 06:03 AM
John D. Burger
 
Posts: n/a
Default Re: [GENERAL] Array assignment behavior (was Re: [ADMIN] Stored procedure array limits)

>> As of 8.2 we could allow assignment to
>> arbitrary positions by filling the intermediate positions with nulls.
>> The code hasn't actually been changed to allow that, but it's
>> something
>> we could consider doing now.

>
> At first blush, this strikes me as a bit too magical/implicit. Are
> there other languages where sequences behave similarly?


> perl -e '@A = (1, 2, 3); print "@A\n"; $A[10] = 10; print "@A\n";'

1 2 3
1 2 3 10

- John D. Burger
MITRE


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply With Quote