Brian Dunning's FileMaker Custom Functions

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 Hanna
Stephen J. Hanna Consulting
http://www.sjhanna.com

Share on Facebook Share on Twitter

  Sample input:
DQ_Put( deque ; item )
  Sample output:
(none)

  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

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 15 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth:

Under construction. Email me your wish list for improvements.