manual:chapter6:libdata:cmd_binputw

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
manual:chapter6:libdata:cmd_binputw [2019/11/06 15:44]
jojo1973
manual:chapter6:libdata:cmd_binputw [2021/09/20 11:16]
jojo1973 Redone
Line 1: Line 1:
 ==== BINPUTW ==== ==== BINPUTW ====
----- 
 <callout type="primary" color="" icon="fa fa-book" title="Synopsis"> <callout type="primary" color="" icon="fa fa-book" title="Synopsis">
 ---- ----
-Store 32-bit words into binary data object+Store 32-bit words into binary data container
 </callout> </callout>
  
Line 9: Line 8:
 ---- ----
 ^  __Input Stack__  ^^^^  ^  __Output Stack__  ^ ^  __Input Stack__  ^^^^  ^  __Output Stack__  ^
-|  **D<sub>dest</sub>**  |  **Num<sub>offset</sub>**  |  **Num<sub>src</sub>**  |  **Num<sub>words</sub>**  |  **→**  |  **D<sub>dest_updated</sub>** +|  **D<sub>dest</sub>**  |  **Num<sub>offset</sub>**  |  **Num<sub>src</sub>**  |  **Num<sub>words</sub>**  |  **→**  |  **D<sub>dest</sub>** 
-|  **D<sub>dest</sub>**  |  **Num<sub>offset</sub>**  |  **S<sub>src</sub>**  |  **Num<sub>words</sub>**  |  **→**  |  **D<sub>dest_updated</sub>** +|  **D<sub>dest</sub>**  |  **Num<sub>offset</sub>**  |  **S<sub>src</sub>**  |  **Num<sub>words</sub>**  |  **→**  |  **D<sub>dest</sub>** 
-|  **D<sub>dest</sub>**  |  **Num<sub>offset</sub>**  |  **L<sub>src</sub>**  |  **Num<sub>words</sub>**  |  **→**  |  **D<sub>dest_updated</sub>** +|  **D<sub>dest</sub>**  |  **Num<sub>offset</sub>**  |  **L<sub>src</sub>**  |  **Num<sub>words</sub>**  |  **→**  |  **D<sub>dest</sub>** 
-|  //Level 4//  |  //Level 3//  |  //Level 2//  |  //Level 1//  |  //→//  |  //Level 1//  | +|  //Level 4//  |  //Level 3//  |  //Level 2//  |  //Level 1//  |  //→//  |  //Level 1//  |
  
 {{page>manual:chapter6:aux:legend&nofooter&noeditbtn&inline}} {{page>manual:chapter6:aux:legend&nofooter&noeditbtn&inline}}
  
-|**Type**| [[manual:chapter5:basics#commands|Command]]  || +| **Keyword type**  | [[manual:chapter5:basics#commands|Command]]  || 
-|**Parallel list processing**| [[manual:chapter5:listproc#group-7multiple-argument-one-result-commands|Group 7]]  ||  +| **Parallel list processing capabilities**  | [[manual:chapter5:listproc#group-7multiple-argument-one-result-commands|Group 7]]  | //Multiple argument, one result commands//  
-|**Affected by flags**| None  ||+| **Affected by flags**  //None//  || 
 + 
 + 
 + 
 + 
 + 
 + 
 + 
 + 
 + 
 + 
 + 
 + 
 + 
 </callout> </callout>
  
 <callout color="orangered" icon="fa fa-comment" title="Description"> <callout color="orangered" icon="fa fa-comment" title="Description">
 ---- ----
-The ''BINPUTW'' command stores a specified number of 32 bits words into a binary data container, starting from an offset position; it's not possible to write data exceeding the container's size.+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: The source of data can be:
  
-  * a **scalar**: the number is converted to an unsigned binary integer and divided into 32-bits words which are stored in the container, in __little endian word order__;+  * 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 **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.   * 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 ''#00000000h''.+If the size of the source data is less than the specified number of words remaining words will be set to ''#0h''.
 </callout> </callout>
  
 <callout type="danger" icon="true" title="Compatibility"> <callout type="danger" icon="true" title="Compatibility">
 ---- ----
-This command is new in newRPL and does not exist in userRPL.+''BINPUTW'' is specific to **newRPL** and has no direct equivalent in **userRPL**.
 </callout> </callout>
  
 <callout type="info" icon="true" title="Usage"> <callout type="info" icon="true" title="Usage">
 ---- ----
 +**__Input__**
 <code> <code>
-4:        BINDATA 2 AAAAAAAAAAAA +4:                BINDATA 2 AAAAAAAAAAAA 
-3:                             +3:                                     
-2:            #1122334455667788h +2:                    #1122334455667788h 
-1:                             +1:                                     
-…………………………………………………………………………………… +………………………………………………………………………………………………………… 
-BINPUTW+BINPUTW                                 
 </code> </code>
-will result in+\\ 
 +**__Output__**
 <code> <code>
-1:        BINDATA 2 VWZ3iYESIzR4 +4:                                       
-…………………………………………………………………………………… +3:                                       
 +2:                                       
 +1:                BINDATA 2 VWZ3iYESIzR4 
 +………………………………………………………………………………………………………… 
 +                                        
 </code> </code>
-a data container storing words ''{ #55667788h #11223344h }'' in positions from 0 to 1. 
----- 
-<code> 
-4:        BINDATA 2 AAAAAAAAAAAA 
-3:                             0 
-2:                           "∞̅" 
-1:                             2 
-…………………………………………………………………………………… 
-BINPUTW 
-</code> 
-(where character on level 2 is $\overline{\infty}$, obtained with **LS<sup>hold</sup>-0**) will result in 
-<code> 
-1:        BINDATA 2 AAAiHqAAADBV 
-…………………………………………………………………………………… 
- 
-</code> 
-a data container storing words ''{ #0000221Eh #00000305h }'' in positions from 0 to 1. 
----- 
-<code> 
-4:        BINDATA 2 AAAAAAAAAAAA 
-3:                             0 
-2: { #1122334455h #5544332211h } 
-1:                             2 
-…………………………………………………………………………………… 
-BINPUTW 
-</code> 
-will result in 
-<code> 
-1:        BINDATA 2 IjNEVBRDMiE5 
-…………………………………………………………………………………… 
- 
-</code> 
-a data container storing words ''{ #22334455h #44332211h }'' in positions from 0 to 1. 
 </callout> </callout>
  
Line 94: Line 79:
 {{page>manual:chapter6:libdata&nofooter&noeditbtn&inline}} {{page>manual:chapter6:libdata&nofooter&noeditbtn&inline}}
 </callout> </callout>
 +
  • manual/chapter6/libdata/cmd_binputw.txt
  • Last modified: 2021/09/23 00:44
  • by jojo1973