The whole discussion since the original post has, it seems to me, been about multibyte character constants.
That's why I thought it was relevant to the discussion.
Thankyou[sic] AWOL - that's really constructive.
You're welcome.
The whole discussion since the original post has, it seems to me, been about multibyte character constants.
That's why I thought it was relevant to the discussion.
Thankyou[sic] AWOL - that's really constructive.
You're welcome.
LOL - so in your reply #4 where you clearly spotted exactly what I did - and you asked him - what's that? You seriously expected him to reply that it was a multibyte character constant?
You can p*** down my back all you want - but don't tell me it's raining.
You know as well as I do he simply mis-used what he intended to be strings and that's the top and the bottom of it. This discussion has, and had, sweat fanny adams to do with multibyte character constants and you know it.
You knew what the problem was back at #4 and you had the opportunity to tell him - you chose not to. You then get all snidy pants with me just because I didn't p*** him about like you were going to.
You can p*** down my back all you want - but don't tell me it's raining.
What an interesting phrase. I wonder what it means.
sweat fanny adams
That's an odd coincidence; I work a few miles from where Fanny Adams was murdered ( it wasn't me, I wasn't there, you can't prove anything ), though around there, she's "sweet"
you clearly spotted exactly what I did - and you asked him - what's that? You seriously expected him to reply that it was a multibyte character constant?
My usual approach is to quietly point out the problem to the questioner, and give them a chance to recognise the problem and correct it. Post count is a very poor indicator of programming competence, in my experience.
yaafm:
Nice explanation, however - your explanation deals with the WHY the compiler treats 'dash' as 'h' and not as any of 'D', 'a' or 's'.I simply stated WHAT it does with no explanation of why. Does the compiler NOT treat 'Dash' as the single character 'h'? Is 'h' NOT the last character of 'dash'? I'm unclear as to which bit of what I said you judge to be not quite right.
Your first retort is incorrect, it is the arrays data type 'char' that causes the truncation. Your second paragraph is correct, as in you were incorrectly assuming what the value of 'dash' is!
So before having a tantrum, you could simply just ask. I posted my original reply with just enough hints to get you going, just as AWOL did. However if you are stuck I'd be glad to explain in depth.
OK - now we've both cleared our chests...
You appear to be unable to understand my contention that I was saying WHAT happens and you are stating WHY it happens. I fully understand the example code you gave but as I say, that is explaining WHY.
If you had answered the thread and started going on to the OP about multibyte characters do you really think that would have brought him clarity to his problem?
It seems to me that all this has achieved nothing except to tarnish what would have otherwise been a simple and successful conclusion to the thread.
I still don't see that anything I said was incorrect nor do I see anything you have said is incorrect. As I've said, several times, WHAT and WHY are two different things.
Anyway I think we're just going to have to agree to disagree.