[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Sun, 8 Feb 2004 17:05:29 +0000 (UTC) 
Subject:how do I pass array parameters to external functions? 
From:f_j_54 
Volume-ID: 

<html><div style='background-color:'><DIV class=RTE><FONT face="Times New Roman">
<P align=left>IN THE NAME OF GOD</P>
<P align=left></P>
<P align=left>Hello.</P>
<P align=left>Can I give a matrix(two dimensional) to a external function(C language)as parameter? and </P>
<P align=left>also, can the external function return the modified matrix?</P>
<P align=left>I tried to pass parameter as array(two dimensional) and pointer.But I was not successful.</P>
<P align=left>For example,I did:</P>
<P align=left></P>
<P align=left><STRONG>external declare mytag in c;</STRONG></P>
<P align=left><STRONG>void f(a)</STRONG></P>
<P align=left><STRONG>int a[2][2]; (or int (*a)[2];)</STRONG></P>
<P align=left><STRONG>{}</STRONG></P>
<P align=left><STRONG>endexternal;</STRONG></P>
<P align=left><STRONG>external load mytag;</STRONG></P>
<P align=left><STRONG>example</STRONG></P>
<P align=left><STRONG>endexternal;</STRONG></P>
<P align=left><STRONG></STRONG></P>
<P align=left><STRONG>vars m;</STRONG></P>
<P align=left><STRONG>newarray([1 2 1 2],4)-&gt;m;</STRONG></P>
<P align=left><STRONG>f(m); (or f(ident m);)</STRONG></P>
<P align=left><STRONG></STRONG></P>
<P align=left>I don't receive any error but don't receive correct answer,also.</P>
<P align=left>Please guide me.</P>
<P align=left>Sincerely,</P>
<P align=left>Jenab.</P>
<P align=left></P></FONT><FONT face="Times New Roman" size=2>
<P align=left>&nbsp;</P></FONT></DIV></div><br clear=all><hr>Add photos to your e-mail with <a href="http://g.msn.com/8HMAEN/2746??PS=";>MSN 8.</a> Get 2 months FREE*.</html>