[PD] symbols with zero paddings and spaces

Dan Wilcox danomatika at gmail.com
Wed Mar 17 11:59:19 CET 2021


The 02, 0003 & 004 are being interpreted as floats and not symbols which is why the leading 0s are dropped

 Try using double quotes to force them to be interpreted as strings.

echo '"01" "02" "0003" "004" "05.txt"' | /usr/bin/pdsend 3001 localhost udp

This works for me on macOS, but the quotes remain with the symbols after receiving. Maybe there is another escape mechanism for this case?

udp: "01" "02" "0003" "004" "05.txt"

> On Mar 17, 2021, at 11:40 AM, pd-list-request at lists.iem.at wrote:
> 
> Message: 4
> Date: Wed, 17 Mar 2021 11:40:29 +0100
> From: oliver <oliver at klingt.org <mailto:oliver at klingt.org>>
> To: pd-list at lists.iem.at <mailto:pd-list at lists.iem.at>
> Subject: [PD] symbols with zero paddings and spaces
> Message-ID: <20640105c3eb39645edcd41d3ad25287 at mail.klingt.org <mailto:20640105c3eb39645edcd41d3ad25287 at mail.klingt.org>>
> Content-Type: text/plain; charset=US-ASCII; format=flowed
> 
> hi, dear list !
> 
> when i try to send a symbol containing spaces AND numbers prepended by 
> zeros with [pdsend], the zeros get truncated in unpredictable ways.
> 
> to see what i mean, please do the following:
> 
> 1.) open the [netreceive] help patch
> 2.) open a console and try the following command:
> 
> ========================== LINUX/OSX: ===============================
> 
> ~$ echo "01 02 0003 004 05.txt" | /usr/bin/pdsend 3001 localhost udp
> 
> =========================== WINDOWS: ================================
> 
>> echo "01 02 0003 004 05.txt" | "C:\Program Files\Pd\bin\pdsend.exe"  
>> 3001 localhost udp
> 
> =====================================================================
> 
> the resulting output from [netreceive -u 3001] will be:
> 
> udp: "01 2 3 4 05.txt"

--------
Dan Wilcox
@danomatika <http://twitter.com/danomatika>
danomatika.com <http://danomatika.com/>
robotcowboy.com <http://robotcowboy.com/>



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20210317/b1ea7dd2/attachment-0001.htm>


More information about the Pd-list mailing list