erl-interface - ing type question

DANIESC SCHUTTE <>
Mon Mar 3 11:32:18 CET 2003


Greetings to all the guru's 

thanks again for all the responses on my earlier questions.  Yet again I have to enquire about the following.

We have got a low level api (written in C) conversing between erlang and sybase 12.5 (if anyone is interested).  Previously we sent the requests in to the api as atoms.  Code such as "(strncmp(ERL_ATOM_PTR(fnp), "rpc", 3) == 0)" was used.

I would like to enquire regarding the use of atoms in this case - is it a good thing or would it be more beneficial to be using lists / strings.  Internally in the erlang application we try to send most data as lists - as it makes it easier to manipulate. 

So the first question:  Is atoms a good thing to use for sending data to the api?  and also for receiving data from the api?  - I recall something about only a fixed number of atoms that can be used or some such thing.

If we want to convert to lists - 
the output can be done as 
"colp = erl_format ("{col, ~s, ~s}", datafmt[i].name, coldata[i].value);"  the ~s converting to strings instead of ~a - converting to atoms.  

the question however is - how would we read lists incoming - unfortuanately in erl_eterm.h i see Int / Float / PID / Port / Ref / Tuple Bin / Cons but no LIST - or am I looking for the wrong type.

Or would the easiest way be sending atoms in and receiving lists?

Any comments are welcome.

Thanks to everyone contributing to the list.

Daniel





Danie Schutte
Phone: +27 - 11 - 203 - 1615
Mobile: 084-468-3138
e-Mail: 

#####################################################################################
The information contained in this message and or attachments is intended
only for the person or entity to which it is addressed and may contain
confidential and/or privileged material.  Any review, retransmission,
dissemination or other use of, or taking of any action in reliance upon,
this information by persons or entities other than the intended recipient
is prohibited. If you received this in error, please contact the sender and
delete the material from any system and destroy and copies.
#####################################################################################



More information about the erlang-questions mailing list