Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. The Ultimate Question...

The Ultimate Question...

Scheduled Pinned Locked Moved The Lounge
questionhelp
11 Posts 8 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    PaulowniaK
    wrote on last edited by
    #1

    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

    L P C 3 Replies Last reply
    0
    • P PaulowniaK

      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

      L Offline
      L Offline
      leppie
      wrote on last edited by
      #2

      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

      M 1 Reply Last reply
      0
      • L leppie

        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

        M Offline
        M Offline
        Mark_Wallace
        wrote on last edited by
        #3

        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!

        L D P 3 Replies Last reply
        0
        • M Mark_Wallace

          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!

          L Offline
          L Offline
          leppie
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          • M Mark_Wallace

            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!

            D Offline
            D Offline
            DaveAuld
            wrote on last edited by
            #5

            Mark Wallace wrote:

            "How long is a piece of string?"

            I am sure they think that is what string theory is all about.

            Dave Don't forget to rate messages!
            Find Me On: Web|Facebook|Twitter|LinkedIn
            Waving? dave.m.auld[at]googlewave.com

            1 Reply Last reply
            0
            • P PaulowniaK

              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

              P Offline
              P Offline
              peterchen
              wrote on last edited by
              #6

              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 42

              Apparently, 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.

              P 1 Reply Last reply
              0
              • P peterchen

                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 42

                Apparently, 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.

                P Offline
                P Offline
                PaulowniaK
                wrote on last edited by
                #7

                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...

                B P 2 Replies Last reply
                0
                • M Mark_Wallace

                  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!

                  P Offline
                  P Offline
                  phannon86
                  wrote on last edited by
                  #8

                  I tend to say "twice as long as from the middle to the end" :)

                  He who makes a beast out of himself gets rid of the pain of being a man.

                  1 Reply Last reply
                  0
                  • P PaulowniaK

                    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

                    C Offline
                    C Offline
                    CPallini
                    wrote on last edited by
                    #9

                    Because 42 is EILSEQ. :-D EILSEQ: invalid multibyte sequence

                    If 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]

                    1 Reply Last reply
                    0
                    • P PaulowniaK

                      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...

                      B Offline
                      B Offline
                      benjymous
                      wrote on last edited by
                      #10

                      PaulowniaK wrote:

                      I wonder if anyone gets my signature...

                      Listen, you stupid machine...

                      Help me! I'm turning into a grapefruit! Buzzwords!

                      1 Reply Last reply
                      0
                      • P PaulowniaK

                        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...

                        P Offline
                        P Offline
                        peterchen
                        wrote on last edited by
                        #11

                        PaulowniaK wrote:

                        I wonder if anyone gets my signature

                        Assuredly Someone Should Apprehend Mmmmthat

                        Agh! Reality! My Archnemesis![^]
                        | FoldWithUs! | sighist | µLaunch - program launcher for server core and hyper-v server.

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups