DQ_Put ( deque ; item )
Puts a new item at the front of a deque or queue
Average rating: 4.5 (24 votes) Log in to vote
Stephen Hanna Stephen J. Hanna Consulting http://www.sjhanna.com |
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
This is a "put" function for a package implementing double-ended queues (DeQues). DQ_Put( deque ) adds the specified item to the rightmost (bottom) end of the specified Deque. See the description of DQ_New( ) for a complete description.
A typical usage scenario would be:
Set Variable [ $myQueue ; DQ_New ( "apple" ) ]
Set Variable [ $dummy ; DQ_Put ( $myQueue ; "kumquat" ) ]
Set Variable [ $fruit ; DQ_Pull ( $myQueue ) ] // $fruit = "kumquat"
Comments
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.