• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Converting a NSString into a math opertation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Converting a NSString into a math opertation


  • Subject: Converting a NSString into a math opertation
  • From: Rodrigo Varela Tabuyo <email@hidden>
  • Date: Wed, 19 Jun 2002 23:56:02 +0200

Hi:

I have the following problem: my application has an custom view where users type math formulas, which are being kept as NSString. There are several objects that use this formula with different values. I am trying to avoid calls to a method which splits the string and identifies the right pieces of string with math operations, with just different parameters, doing all over again each time a value from that formula is needed. What I need to know is if there is a way of converting a NSString directly into a math function like the following example:
NSString *myCalc=@"sqrt(9)";
//I need code to have the same output from myCalc
float = sqrt(9);
Is there something similar to what PHP can do? or any other way...

Thank you.

Rodrigo Varela Tabuyo
A Coruqa, Spain.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Converting a NSString into a math opertation
      • From: Itrat Khan <email@hidden>
    • Re: Converting a NSString into a math opertation
      • From: Sherm Pendley <email@hidden>
  • Prev by Date: animation
  • Next by Date: NSOutlineView newbie completely flummoxed
  • Previous by thread: Re: cocoa-dev digest, Vol 2 #810 - 14 msgs
  • Next by thread: Re: Converting a NSString into a math opertation
  • Index(es):
    • Date
    • Thread