MathGroup Archive 2003

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

Search the Archive

Re: Non-string output in for loop


Hi,

MLGetIntegerList() 

may help you.

Regards
  Jens

Peter Saffrey wrote:
> 
> This is installment number 3 in my struggles with mathlink.
> 
> I am writing an application that interacts with Mathematica (through
> mathlink) via a series of packages written by me. What I want is the
> output from a derived interpolating function so I can convert it into
> a data structure I can use for my own purposes. I have managed to make
> Mathematica dump the values from the interpoloating function table one
> by one, but unfortunately because I use the Mathematica Print function
> they are all sent back to me as strings. This is workable, but not
> very elegant or efficient since I'd have to do some ugly string
> processing to get at the numbers, rather than just using
> MLGetInteger().
> 
> Is there any way I can get Mathematica to output the values not as
> strings? Essentially I need the following piece of code:
> 
> For[i=1,i<=10,i++,Print[i]]
> 
> to give me 1-10 but as "output" (as if you'd typed 1(enter)2(enter)...
> in a notebook), not as strings (print[1](enter)print[2](enter))etc.
> 
> Peter


  • Prev by Date: Re: Terras inverse
  • Next by Date: Re: Diff. Equ
  • Previous by thread: Non-string output in for loop
  • Next by thread: Re: Polynomial constructing