Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Need a little help! (Read 2843 times)
Charlie42
Junior Member
**
Offline


Posts: 33
Joined: Dec 8th, 2013
Need a little help!
Mar 19th, 2014 at 10:04pm
Print Post  
Hello everyone,

          I am needing some help with a little problem. 

      What I have is a  Serial Graphic Display. To display strings the string has to be terminated with a null byte(0). Using my pic compiler its easy. With  Arduino it is a little more complicated... at least to me. can someone give me some pointers? Thanks.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Need a little help!
Reply #1 - Mar 19th, 2014 at 10:09pm
Print Post  
Hi there,

The best place for general Arduino programming questions is the arduino.cc/forum. 

They have lots of clever people helping in the forum  Smiley
  
Back to top
IP Logged
 
Gilles Plante
Full Member
***
Offline


Posts: 156
Location: Québec, Canada
Joined: Oct 31st, 2013
Re: Need a little help!
Reply #2 - Mar 20th, 2014 at 12:23pm
Print Post  
Hi Charlie42,

in C, the standard is the a character string ends in 0 (null). If you use standard library routines like strcat(), strcopy() etc., the null is added automatically. If you build your strings from some algorythm, you must append the null at the end, for example:

Code
Select All
char SomeString[15]
      
      SomeString[0] = ...
      ...
      SomeString[i] = ...
      SomeString[i + 1] = '\0'; // adds the terminating character
 


Hope that helps  Smiley.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint