[erlang-questions] Question on Erlang Port Driver

Dave <>
Thu Jan 26 10:00:38 CET 2012


Hey everyone,



Quick beginner question in relation to the example given on the Erlang Port
Drivers Interoperability Tutorial located at
http://www.erlang.org/doc/tutorial/c_portdriver.html. 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:



/* complex.c */
double foo(double x) {
  return x/1.0;
}
double bar(double y) {
  return y/2.0;
}


Thanks in advance for your help!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120126/4a8f7c29/attachment.html>


More information about the erlang-questions mailing list