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

    String conversion to integer

    SDK Help
    0
    5
    382
    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
      Helper
      last edited by

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

      On 17/05/2004 at 05:41, xxxxxxxx wrote:

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

      ---------
      I need to be able to convert a string to an integer.  It looked like int() might work but I get errors.  Is this the right function or is there another?
      Thanks.

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

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

        On 17/05/2004 at 06:18, xxxxxxxx wrote:

        StringToLong() will do it.

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

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

          On 17/05/2004 at 06:23, xxxxxxxx wrote:

          It might be eval() in C.O.F.F.E.E. if I remember correctly. (Though it does some additional evaluation, e.g. "5+5" will be 10. Whether that is good or bad depends on the context I guess.)

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

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

            On 17/05/2004 at 06:51, xxxxxxxx wrote:

            upps, haven´t noticed it was coffee. sorry. evaluate() will do so in COFFEE, but you need to cast it after the parsing for it returns a float value.

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

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

              On 17/05/2004 at 19:25, xxxxxxxx wrote:

              Thanks you guys.  That's what I needed.  I was looking for a StringToInt, Int, ctoi, or something of the sort.  I never read about evaluate.  That did the trick.
               
              Crew

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