1. [3.1]Can send null (\0 ?) ? [SOLVED]

Is there a way to send a null character (\0)? I'm trying to send a "null terminated string" over USB port to a micro-controller running a C plus plus style program.

Dan M.

new topic     » topic index » view message » categorize

2. Re: [3.1]Can send null (\0 ?) ?

DanM_anew said...

Is there a way to send a null character (\0)? I'm trying to send a "null terminated string" over USB port to a micro-controller running a C plus plus style program.

Dan M.

Hi Dan,

Just append a zero (#00) to the string.

Example:

serial_puts(hCom, "null terminated string" & 0) 

- Fernando

new topic     » goto parent     » topic index » view message » categorize

3. Re: [3.1]Can send null (\0 ?) ? [SOLVED]

Fernando said...
DanM_anew said...

Is there a way to send a null character (\0)? I'm trying to send a "null terminated string" over USB port to a micro-controller running a C plus plus style program.

Dan M.

Hi Dan,

Just append a zero (#00) to the string.

Example:

serial_puts(hCom, "null terminated string" & 0) 

- Fernando

Oh! Ok. Thanks!

[EDIT] It worked! And it ALWAYS surprises me when programming things WORK!

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu