binsert (buffer, position, value)
A buffer.
A number giving the zero-based position of the new element within the buffer, or a function.
A number which will be cast to an 8-bit signed integer.
The binsert function inserts the value by moving all other values after position one space to the right, and removing the last value from the buffer.
If position is a function, it is taken to be a comparison function with two arguments. The value will be inserted using a binary insertion sort with the function as the comparison. A comparison function must return a negative number if the value is ordinally less than the buffer element, 0 if the two are equal, and a positive number if the value is ordinally greater than the buffer element.
Copyright © 1995-2010 by Cogent Real-Time Systems, Inc. All rights reserved.