==== USBSEND ==== ---- ---- Send an object through the USB link ---- ^ __Input Stack__ ^ ^ __Output Stack__ ^ | **O** | **→** | **1/0** | | //Level 1// | //→// | //Level 1// | {{page>manual:chapter6:aux:legend&nofooter&noeditbtn&inline}} |**Type**| [[manual:chapter5:basics#commands|Command]] || |**Parallel list processing**| [[manual:chapter5:listproc#group-5one-argument-one-result-commands|Group 5]] || |**Affected by flags**| [[manual:appendix:flags#flag-47|-47]] | Automatic reception and execution of data sent via USB | ---- The ''USBSEND'' command sends an object to another calculator using the USB link, provided the connection has been successufully negotiated. If the transfer succeeds ''USBSEND'' will leave ''1'' on the stack, otherwise it will leave ''0''. The setting of flag [[manual:appendix:flags#flag-47|-47]] on the __destination__ machine has an effect on ''USBSEND'' on the __source__ machine, because the transfer queue can manage just one object at a time: until the object currently sent is not received by the destination calc any subsequent transfer will fail. ---- This command is new in newRPL and does not exist in userRPL. ---- The following program « @@ Make a list with value and variable name and send it 2 →LIST DO DUP UNTIL USBSEND END DROP @@ Write a program to explode the list and do 'STO' in the other calc... « OBJ→ DROP STO » @@ ...and send it! DO DUP UNTIL USBSEND END DROP » executes a ''[[manual:chapter6:dirs:cmd_sto|STO]]'' through USB. See ''[[manual:chapter6:usb:cmd_usbrecv|USBRECV]]'' for implementation of a USB ''[[manual:chapter6:dirs:cmd_rcl|RCL]]''. ---- {{page>manual:chapter6:usb&nofooter&noeditbtn&inline}}