MathGroup Archive 1998

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

Search the Archive

Re: Mathlink problem with lists of reals



Hi,

You gave RealList as head of ns

> :Begin:
> :Function: writesample
> :Pattern: WriteSample[filename_String, ns_RealList] (* !!!! That's Your        
                                                         problem *)
> :Arguments: {filename, ns}
> :ArgumentTypes: {String, RealList}
> :ReturnType: Integer
> :End:
> 

This pattern will never match because Mathematica has no RealList data
type. In fact You must say

:Pattern: WriteSample[filename_String,ns_ /; VectorQ[ns,Real]]


ns has the head List[] and not RealList or what ever. RealList is a
``type'' for mprep -- not for Mathematica.

Hope that helps
Jens




  • Prev by Date: Re: Writing output to text files
  • Next by Date: Re: Writing output to text files
  • Prev by thread: Re: Mathlink problem with lists of reals
  • Next by thread: Mathlink problem with lists of reals