MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Mathlink problem with number format

  • To: mathgroup at smc.vnet.net
  • Subject: [mg39915] Re: [mg39785] Mathlink problem with number format
  • From: Omega Consulting <info at omegaconsultinggroup.com>
  • Date: Tue, 11 Mar 2003 02:38:41 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

At 02:31 AM 3/7/2003, Rolf Alber wrote:
>Hello together !
>
>I hope someone can help me with the following problem:
>
>I am using Mathematica via a Mathlink Connection. As commands I am sending
>text-packets and I want to receive the calculated result also as
>Returntext-packet.
>This so far works well unless the calculated result is in an exponential
>format like p.ex.
>2.93219 x 10^7
>
>In this case I would  receive in the Returntext-packet something like this:
>           7\0122.93219 10    (with 10 leading blanks)
>
>which is very unsatisfying for me.
>
>Any help is highly appreciated.
>
>Greetings,
>
>Rolf

You are getting the string result for an exponential number in OutputForm.

You should use a method that gives a ReturnPacket, not a ReturnTextPacket. 
Then you can read the result into a C double with MLGetReal and format it 
however you like in C.

--------------------------------------------------------------
Omega Consulting
"The final answer to your Mathematica needs"
http://omegaconsultinggroup.com



  • Prev by Date: Re: presentation layout
  • Next by Date: Re: pattern matching with repeated named patterns
  • Previous by thread: Re: Mathlink problem with number format
  • Next by thread: Re: Mathlink problem with number format