Tobias S. Josefowitz wrote:
>On Thu, Nov 17, 2016 at 11:37 AM, Stephen R. van den Berg <s...@cuci.nl> wrote:
>> Lance Dillon wrote:
>>>Stdio.File fp;fp=Stdio.File(filename,"r");string str=fp->read(2);int 
>>>res=array_sscanf(reverse(str),"%2c")[0];

>> Using %2c to read little endian probably only works on CPUs that are
>> little endian to begin with.

>"%c"
...

>"-"
>Supplying a minus sign toggles the decoding to read the data encoded
>in little-endian byte order, rather than the default network
>(big-endian) byte order.

RTFM, thanks.
Well, in any case, using Stdio.Buffer.sscanf() then still is the
recommended way.
-- 
Stephen.
  • lit... Lance Dillon
    • ... Stephen R. van den Berg
      • ... Tobias S. Josefowitz
        • ... Lance Dillon
          • ... Lance Dillon
            • ... Stephen R. van den Berg
        • ... Stephen R. van den Berg
      • ... Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum
        • ... Lance Dillon
          • ... Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum
            • ... Lance Dillon
    • ... Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum
      • ... Martin Nilsson (Coppermist) @ Pike (-) developers forum

Reply via email to