Quantcast
Channel: MCS Electronics Forum
Viewing all articles
Browse latest Browse all 20563

BASCOM-AVR : data loss using inkey #2 with software UART : REPLY

$
0
0
[quote:dd924842bb]Would you point out the exact place to find this use within the "examples section" ? [/quote:dd924842bb] I did " search printbin" and I get for the syntax: [quote:dd924842bb]Syntax PRINTBIN var [ ; varn] PRINTBIN #channel, var [; varn] [/quote:dd924842bb] So far no mention of the additional parameter. Further down you find what I would call an example: [quote:dd924842bb]The number of bytes to send can be specified by an additional numeric parameter. This is convenient when sending the content of an array. Printbin ar(1) ; 3 ' will send 3 bytes from array ar(). Printbin ar(1) ; 2 ; ar(2) ; 4 ' will send 2 bytes from array ar() starting at index 1, then 4 bytes from array ar() starting at index 2. [/quote:dd924842bb] I was a wondering that a <;> is required here, whereas I would expect a comma - and indeed, if you look at the help for print under the section for SPI you find: [quote:dd924842bb]You must use a comma (,) to specify this parameter. This because the semi colon <;> is used to send multiple variables.[/quote:dd924842bb] I find this not really consistent. But it was clearly my ignorance to try using a variable in place of a numeric constant. Nevertheless the compiler did not complain and somehow it worked, just not the way I expected...

Viewing all articles
Browse latest Browse all 20563

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>