Go to Post "It's robotics season; I no longer know what sleep is." - StephLee [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 25-01-2007, 19:58
brianafischer brianafischer is offline
Registered User
FRC #0503 (Frog Force)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2003
Location: Michigan
Posts: 17
brianafischer is on a distinguished road
Line Continuation Character in MPLAB?

Does MPLAB support the line continuation character? I searched the C18 User's Guide to no avail with the phrase "continuation".

A google search brought up this result, but it looks like they are using macros...

Thanks,
  #2   Spotlight this post!  
Unread 25-01-2007, 22:44
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,817
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Line Continuation Character in MPLAB?

A C statement can be spread over as many lines as you like without involving any special characters, so I'm not sure I understand your question.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #3   Spotlight this post!  
Unread 25-01-2007, 23:07
Shinigami2057 Shinigami2057 is offline
Slackware Is Your New God (Mentor)
AKA: Harry Bock
FRC #1350 (Rambots)
Team Role: Programmer
 
Join Date: Oct 2006
Rookie Year: 2006
Location: Johnston, RI
Posts: 106
Shinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really nice
Re: Line Continuation Character in MPLAB?

Yeah, unless you are using macros there's no need for the line continuation char (which is \ ). If you want to break a string over multiple lines you can do

Code:
printf("Start of the line"
          "Continuation");
without any special chars.
__________________
One of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs.
  #4   Spotlight this post!  
Unread 27-01-2007, 09:11
Roger Roger is offline
Registered User
FRC #1153
 
Join Date: Jan 2006
Rookie Year: 1900
Location: Walpole MA
Posts: 685
Roger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond reputeRoger has a reputation beyond repute
Re: Line Continuation Character in MPLAB?

I have nothing to add about continuations, but

Code:
printf("Start of the line"
          "Continuation");
produces

Quote:
Start of the lineContinuation
Have to put a space inside one of the quotes so the non-programmers can understand it.

Roger.
  #5   Spotlight this post!  
Unread 27-01-2007, 19:26
brainonska's Avatar
brainonska brainonska is offline
Registered User
AKA: Magical Steve
FRC #1155 (Sciborgs)
Team Role: Programmer
 
Join Date: Apr 2006
Rookie Year: 2006
Location: New York City
Posts: 19
brainonska is an unknown quantity at this point
Send a message via AIM to brainonska
Re: Line Continuation Character in MPLAB?

there are no continuation characters if i get your question right...
there are "discontinuation" characters as escape sequences...
all printf statements will print out their arguments on the same line unless you tell it explicitly not too. For example, the following code...

printf("Some say UNIX\nhath daemons");

//will output:

Some say UNIX
hath daemons

Its because when the compiler reads '\n' it knows not to print it, but to start a new line. This is an escape sequence and there are others (i.e. \t ).
__________________
Real programmers don't comment their code:
it was hard to write... it should be hard to understand
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Searching - Why is there a 3-character min length? DanL CD Forum Support 3 13-01-2004 23:21
using the MPLAB IDE MPLAB SIM simulator WizardOfAz Programming 1 03-11-2003 01:24
Name That Character! Amber H. Chit-Chat 18 17-01-2003 15:44
character studio archiver 2001 2 23-06-2002 23:41
ss of team 30's main character =) RobDeCotiis 3D Animation and Competition 0 18-02-2002 08:19


All times are GMT -5. The time now is 11:16.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi