The Ultimate Question...
-
I've been banging my head against the wall for the last few hours because there's something going wrong with my strings. (I know I should probably do a bit more reading, so this isn't about the actual error.) Anyway, I have a function that uses
wcstombs_s
. (It returns 0 if it succeeds.) Obviously, mine doesn't return with 0. It returns with 42. 42!! Of all numbers, 42!? ... ... ... So what was the question again...? ;P
-
I've been banging my head against the wall for the last few hours because there's something going wrong with my strings. (I know I should probably do a bit more reading, so this isn't about the actual error.) Anyway, I have a function that uses
wcstombs_s
. (It returns 0 if it succeeds.) Obviously, mine doesn't return with 0. It returns with 42. 42!! Of all numbers, 42!? ... ... ... So what was the question again...? ;P
PaulowniaK wrote:
So what was the question again...?
Q: What is the difference of a string? A: 42! ;P
xacc.ide
IronScheme - 1.0 RC 1 - out now!
((λ (x) `(,x ',x)) '(λ (x) `(,x ',x))) The Scheme Programming Language – Fourth Edition -
PaulowniaK wrote:
So what was the question again...?
Q: What is the difference of a string? A: 42! ;P
xacc.ide
IronScheme - 1.0 RC 1 - out now!
((λ (x) `(,x ',x)) '(λ (x) `(,x ',x))) The Scheme Programming Language – Fourth Editionleppie wrote:
Q: What is the difference of a string?
As an English native, I was going to say "How long is a piece of string?" -- people say that all the time, in England. They rarely say anything interesting, but they do ask about string lengths a lot.
I wanna be a eunuchs developer! Pass me a bread knife!
-
leppie wrote:
Q: What is the difference of a string?
As an English native, I was going to say "How long is a piece of string?" -- people say that all the time, in England. They rarely say anything interesting, but they do ask about string lengths a lot.
I wanna be a eunuchs developer! Pass me a bread knife!
Mark Wallace wrote:
As an English native, I was going to say "How long is a piece of string?" -- people say that all the time, in England.
That was the inspiration, but seeing it was a string comparison function, I thought difference would go along better :)
xacc.ide
IronScheme - 1.0 RC 1 - out now!
((λ (x) `(,x ',x)) '(λ (x) `(,x ',x))) The Scheme Programming Language – Fourth Edition -
leppie wrote:
Q: What is the difference of a string?
As an English native, I was going to say "How long is a piece of string?" -- people say that all the time, in England. They rarely say anything interesting, but they do ask about string lengths a lot.
I wanna be a eunuchs developer! Pass me a bread knife!
-
I've been banging my head against the wall for the last few hours because there's something going wrong with my strings. (I know I should probably do a bit more reading, so this isn't about the actual error.) Anyway, I have a function that uses
wcstombs_s
. (It returns 0 if it succeeds.) Obviously, mine doesn't return with 0. It returns with 42. 42!! Of all numbers, 42!? ... ... ... So what was the question again...? ;P
We can conclude that the error description is, or leads directly to THE QUESTION. Now, you really want me to tell you? . . . . . . . . .
// errno.h
/* Error codes used in the Secure CRT functions */
#define EILSEQ 42Apparently, the question is "Does this string contain illegal multibyte sequences?" See, Unicode IS important! Now, for something completely different...
Agh! Reality! My Archnemesis![^]
| FoldWithUs! | sighist | µLaunch - program launcher for server core and hyper-v server. -
We can conclude that the error description is, or leads directly to THE QUESTION. Now, you really want me to tell you? . . . . . . . . .
// errno.h
/* Error codes used in the Secure CRT functions */
#define EILSEQ 42Apparently, the question is "Does this string contain illegal multibyte sequences?" See, Unicode IS important! Now, for something completely different...
Agh! Reality! My Archnemesis![^]
| FoldWithUs! | sighist | µLaunch - program launcher for server core and hyper-v server.Actually, I'm not sure whether to laugh... Anyway, yes, I am onto fixing my code, but am having trouble working out where the illegal multibytes slipped in... I wonder if anyone gets my signature...:confused:
Almost, but not quite, entirely unlike... me...
-
leppie wrote:
Q: What is the difference of a string?
As an English native, I was going to say "How long is a piece of string?" -- people say that all the time, in England. They rarely say anything interesting, but they do ask about string lengths a lot.
I wanna be a eunuchs developer! Pass me a bread knife!
-
I've been banging my head against the wall for the last few hours because there's something going wrong with my strings. (I know I should probably do a bit more reading, so this isn't about the actual error.) Anyway, I have a function that uses
wcstombs_s
. (It returns 0 if it succeeds.) Obviously, mine doesn't return with 0. It returns with 42. 42!! Of all numbers, 42!? ... ... ... So what was the question again...? ;P
Because
42
isEILSEQ
. :-D EILSEQ: invalid multibyte sequenceIf the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
Actually, I'm not sure whether to laugh... Anyway, yes, I am onto fixing my code, but am having trouble working out where the illegal multibytes slipped in... I wonder if anyone gets my signature...:confused:
Almost, but not quite, entirely unlike... me...
PaulowniaK wrote:
I wonder if anyone gets my signature...
Listen, you stupid machine...
Help me! I'm turning into a grapefruit! Buzzwords!
-
Actually, I'm not sure whether to laugh... Anyway, yes, I am onto fixing my code, but am having trouble working out where the illegal multibytes slipped in... I wonder if anyone gets my signature...:confused:
Almost, but not quite, entirely unlike... me...