This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com
Home
The collection.shift( ) method removes the first element of the collection and returns it as the function result.
Note: This method modifies the original collection.
If the collection is empty, this method does nothing.
C_COLLECTION($c) $c:=New collection(1;2;4;5;6;7;8) $val:=$c.shift() // $val=1 // $c=[2,4,5,6,7,8]
collection.push( ) collection.unshift( )
Product: 4D Theme: Collections Number: 805257
Created: 4D v16 R6
4D Language Reference ( 4D v19) 4D Language Reference ( 4D v19.1) 4D Language Reference ( 4D v19.4) 4D Language Reference ( 4D v19.5) 4D Language Reference ( 4D v19.6) 4D Language Reference ( 4D v19.7) 4D Language Reference ( 4D v19.8)