Show pageDiscussionOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ==== BINPUTW ==== <callout type="primary" color="" icon="fa fa-book" title="Synopsis"> ---- Store 32-bit words into a binary data container </callout> <callout color="green" icon="fa fa-indent" title="Stack Diagram"> ---- ^ __Input Stack__ ^^^^ ^ __Output Stack__ ^ | **D<sub>dest</sub>** | **Num<sub>offset</sub>** | **Num<sub>src</sub>** | **Num<sub>words</sub>** | **→** | **D<sub>dest-upd</sub>** | | **D<sub>dest</sub>** | **Num<sub>offset</sub>** | **S<sub>src</sub>** | **Num<sub>words</sub>** | **→** | **D<sub>dest-upd</sub>** | | **D<sub>dest</sub>** | **Num<sub>offset</sub>** | **L<sub>src</sub>** | **Num<sub>words</sub>** | **→** | **D<sub>dest-upd</sub>** | | //Level 4// | //Level 3// | //Level 2// | //Level 1// | //→// | //Level 1// | {{page>manual:chapter6:aux:legend&nofooter&noeditbtn&inline}} | **Keyword type** | [[manual:chapter5:basics#commands|Command]] || | **Parallel list processing capabilities** | [[manual:chapter5:listproc#group-7multiple-argument-one-result-commands|Group 7]] | //Multiple argument, one result commands// | | **Affected by flags** | //None// || </callout> <callout color="orangered" icon="fa fa-comment" title="Description"> ---- The ''BINPUTW'' command stores a specified number of 32-bit words into a binary data container, starting from an offset position; it's not possible to write data exceeding the container's size. The source of data can be: * a **scalar**: the number is converted to an unsigned binary integer and divided into 32-bit words which are stored in the container, in __little endian word order__; * a **string**: the string is converted to a stream of UTF8 codepoints whose lower 32 bits are stored into the container; * a **list of scalars**: each number is converted to an unsigned binary integer and its lower 32 bits are written in the container. If the size of the source data is less than the specified number of words remaining words will be set to ''#0h''. </callout> <callout type="danger" icon="true" title="Compatibility"> ---- ''BINPUTW'' is specific to **newRPL** and has no direct equivalent in **userRPL**. </callout> <callout type="info" icon="true" title="Usage"> ---- **__Input__** <code> 4: BINDATA 2 AAAAAAAAAAAA 3: 0 2: #1122334455667788h 1: 2 ………………………………………………………………………………………………………… BINPUTW </code> \\ **__Output__** <code> 4: 3: 2: 1: BINDATA 2 VWZ3iYESIzR4 ………………………………………………………………………………………………………… </code> </callout> <callout color="darkgray" icon="fa fa-hand-o-right" title="Related Commands"> ---- {{page>manual:chapter6:libdata&nofooter&noeditbtn&inline}} </callout> manual/chapter6/libdata/cmd_binputw.txt Last modified: 2021/09/23 00:44by jojo1973