Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    big endian

    Scheduled Pinned Locked Moved SDK Help
    2 Posts 0 Posters 209 Views
    Loading More Posts
    • 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.
    • H Offline
      Helper
      last edited by

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

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post