big endian

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 15/04/2012 at 13:21, xxxxxxxx wrote:

User Information:
Cinema 4D Version:   13 
Platform:   Windows  ;   
Language(s) :   C.O.F.F.E.E  ;

---------
 
Hi, all
 
i have some question about byte ordering.
 
 
Ex of mem2long in sdk
 
  // Outputs "0xF00B1201 = -267709951
  //          0x01120BF0 = 17959920".
  
  var mem = new(bytes,4);
  
  mem[0] = 0xF0;
  mem[1] = 0x0B;
  mem[2] = 0x12;
  mem[3] = 0x01;
  
  var motorola = mem2long(mem,0,GE_MOTOROLA);
  var intel = mem2long(mem,0,GE_INTEL);
  
  println("0xF00B1201 = ",motorola);
  println("0x01120BF0 = ",intel);
 
 
 
result
 
0xF00B1201 = 17959920
0x01120BF0 = 17959920
 
 
I dont' understand this.
somebody help me.
 
 
this is right result
 
// Outputs "0xF00B1201 = -267709951
//          0x01120BF0 = 17959920".

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 15/04/2012 at 16:50, xxxxxxxx wrote:

Remember that most Mac computers use Intel cpus these days.  You won't find many with the old Motorola cpu any more - especially for C4D R11 and later.