Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1994
*January
*February
*March
*April
*May
*June
*July
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1994

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

Search the Archive

C program and Mathematica

  • To: mathgroup at yoda.physics.unc.edu
  • Subject: C program and Mathematica
  • From: tfister at cornea.mbvlab.wpafb.af.mil (Tom Fister)
  • Date: Fri, 21 Jan 94 10:02:13 EST

>From Tom Fister

I would like to thank everyone who
sent me help on the matrix printing 
problem.  Now, I have another question.

I am trying to install a c program 
into mathemtica.  The program will
return an integer list and a string.
I can get it to return either an
integer string or list but not both
I would like to return a list in the form
  
    {{1,2,3},"teststring"}
    
The C program is as follows


int main(argc,argv)
    int argc;
    char  *argv[];
    
    {
     return MLMain(argc,argv);
    }

   
int   test()
     {
     char string[100];
     int  array[3];
     
     strcpy(string,"teststring");

     array[0]=1;
     array[1]=2;
     array[2]=3;

     MLPutIntegerList(stdlink,array,3);
     MLPutSting(stdlink,string);
     }
  

  And, I have created a .tm file.  I am
  compiling using mcc.   





  • Prev by Date: Ticks and GridLines
  • Next by Date: Mathematica @ maple : integration
  • Previous by thread: Ticks and GridLines
  • Next by thread: Mathematica @ maple : integration