Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2001

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

Search the Archive

Reading arrays in mathlink

  • To: mathgroup at
  • Subject: [mg30069] Reading arrays in mathlink
  • From: Sseziwa Mukasa <mukasa at>
  • Date: Thu, 26 Jul 2001 01:20:05 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

How does one read an array in Mathlink whose entries are either real or

I am trying the following seqeunce

int r,c,i,j,args;
char *sym;
double val;

MLCheckFunction( stdlink, "List", &r)
for (i=0; i<r; i++) {
    MLCheckFunction( stdlink, "List", &c);
    for (j=0,j<c,j++) {
        MLGetFunction( stdlink, &sym, &args);
        switch (args) {
            case 1 :
                MLGetReal( stdlink, &val);
            case 2 :
                MLGetReal( stdlink, &val); /* Get real part*/
                MLGetReal( stdlink, &val); /* Get imaginary part*/

The connection dies for some reason.  I have no idea why,

  • Prev by Date: NDSolve does not let me to stop
  • Next by Date: Element-by-element Matrix Multiplication
  • Previous by thread: Re: NDSolve does not let me to stop
  • Next by thread: Element-by-element Matrix Multiplication