<p>Hey everyone,</p><p> </p><p>Quick beginner question in relation to the example given on the Erlang Port Drivers Interoperability Tutorial located at <a href="http://www.erlang.org/doc/tutorial/c_portdriver.html" target="_blank">http://www.erlang.org/doc/tutorial/c_portdriver.html</a>. How would this example (the complex5 module and the port_driver.c file) be expanded if you wanted to send/receive doubles instead of integers less than 256, while still sticking with the port_drivers interoperability and not switching to one of the other types? Such as if the c function you were creating ap ort to, complex.c, was:</p>
<p> </p><p>/* complex.c */<br>double foo(double x) {<br> return x/1.0;<br>}<br>double bar(double y) {<br> return y/2.0;<br>}</p><p><br>Thanks in advance for your help!</p>