19.0.0 released Nov 08, 2023
Write fifo

Purpose: Write key/value pair into a FIFO list.

write-fifo <list> key <key> value <value>

write-fifo adds a pair of key/value pointers to the FIFO <list>, specified with string <key> and <value> (in "key" and "value" clauses, collectively called an "element").

It always adds elements to the end of the list. <value> is a pointer to any type, allowing storage of any kind of data.

Memory pointed by <key> and <value> must not go out of scope or be freed while FIFO is used - if necessary, store a copy (see copy-string for strings). This is because write-fifo does not make copies of <key> and <value>, rather only the pointers to those are stored.
Examples
new-fifo define nf
write-fifo nf key "mykey" value "myvalue"

See also
FIFO
new-fifo  
purge-fifo  
read-fifo  
rewind-fifo  
write-fifo    
See all
documentation


You are free to copy, redistribute and adapt this web page (even commercially), as long as you give credit and provide a dofollow link back to this page - see full license at CC-BY-4.0. Copyright (c) 2019-2023 Dasoftver LLC. Vely and elephant logo are trademarks of Dasoftver LLC. The software and information on this web site are provided "AS IS" and without any warranties or guarantees of any kind. Icons from table-icons.io copyright PaweĊ‚ Kuna, licensed under MIT license.