Joined: 07 Jan 2004 Posts: 1615 Location: Central Illinois, USA
Question on declaring strings
Posted: Tue Sep 15, 2009 9:49 am
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
Posted: Tue Sep 15, 2009 12:29 pm
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
Posted: Tue Sep 15, 2009 1:33 pm
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
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