Contacting with net_adm:ping/1

Robert Virding rv@REDACTED
Thu Nov 18 17:03:49 CET 1999


Nuno Silva <nsilva@REDACTED> writes:
>Problem 2:
>
>When I export a function named "query/1" I get compiler error: "syntax 
error before: '/'".
>If I export the function "queryy/1" (notice the 2 yy), no error is 
reported...
>Is it "query" a reserved word or something like that?... Even so, why 
does not the compiler report a simple " Warning: defining BIF 
query/1"?...

You are right, of course.  "query" is a reserved word, like "case" or 
"if", and as such can only be in the context of defining a query and 
cannot be used as an atom or function name.

A query is not a BIF so therefore you will never a compiler warning 
about redefining query.

If you want to give a function the name "query" or use it as an atom 
then you have to quote it - 'query'.

	Robert
-- 
Robert Virding                          Tel: +46 (0)8 692 22 12
Bluetail AB                             Email: rv@REDACTED
Hantverkargatan 78                      WWW: http://www.bluetail.com
SE-112 38 Stockholm, SWEDEN
"Folk säger att jag inte bryr mig om någonting, men det skiter jag i".





More information about the erlang-questions mailing list