>Additionally, I did run into a problem using  the + modifier in sprintf(): 
>while the resulting string is encoded as signed, it prepends a +, which 
>seems incorrect to me, such that it's not possible to decode without first 
>removing the +:
>
>array_sscanf(sprintf("%-+4c", -65335), "%-+4c");
>(16) Result: ({ /* 1 element */
>                  -16725717
>              })

While prepending the + seems a bit pointless, that's what + does in
sprintf.  You don't need to add it to get a "signed" binary number:

> array_sscanf(sprintf("%-4c", -65335), "%-+4c"); 
(2) Result: ({ /* 1 element */
                -65335
            })
>
  • pos... H. William Welliver III
    • ... Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum
      • ... Bill Welliver
        • ... Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum
          • ... Bill Welliver
            • ... Mirar @ Pike developers forum
              • ... Bill Welliver
                • ... Mirar @ Pike developers forum
                • ... Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum
                • ... Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum
        • ... Mirar @ Pike developers forum
          • ... Bill Welliver
            • ... Henrik Grubbstr�m (Lysator) @ Pike (-) developers forum
              • ... Bill Welliver

Reply via email to