CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Question on declaring strings

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
bkamen



Joined: 07 Jan 2004
Posts: 1615
Location: Central Illinois, USA

View user's profile Send private message

Question on declaring strings
PostPosted: Tue Sep 15, 2009 9:49 am     Reply with quote

Hey guys,

I'm working on that TCP/IP project and I've found something that has caught the interest of me and another programmer.

The CCSized MCHP TCP/IP stack has 2 ways of declaring strings... One we all know and love and another we've never seen.
Code:

const char string[] = "some text"; // we know this one

char string = {"Some text"};

Anyone else ever see this and know how it might differ?

-Ben


EDIT:

It doesn't make for a happy CCS compile run. so it doesn't work. What the heck was someone thinking?
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Sep 15, 2009 12:29 pm     Reply with quote

Post the filename where you found this problem. Post the directory path
to the file. Post the line number in the file.

Post your compiler version.
bkamen



Joined: 07 Jan 2004
Posts: 1615
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Tue Sep 15, 2009 1:33 pm     Reply with quote

PCM programmer wrote:
Post the filename where you found this problem. Post the directory path
to the file. Post the line number in the file.

Post your compiler version.


I'm running 4.099 -- and I can't find it now -- I copy/pasted a glob of text... maybe something just got mucked up.

Weird.

I can't even find the example webserver code I started with to make my stuff from.

I'm losing my mind.

In either case, it doesn't compile (as it shouldn't).. I don't think CCS is broken at all.

At this point, I would delete this thread if I could.

Nothing to see here --- move along -- Move along...
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group