[sr-dev] question about module function arguments

Juha Heinanen jh at tutpro.com
Thu Oct 14 13:57:29 CEST 2010


andrei,

i have to ask one more question about function arguments.  i have
defined

    {"from_any_gw", (cmd_function)from_any_gw_2, 2, 0, 0,
     REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE},

and if i try to call that function like this:

    if (!from_any_gw(192.98.102.1, 2)) {

i get syntax error, but if i enclose 192.98.102.1 in quotes:

   if (!from_any_gw("192.98.102.1", 2)) {

i do not get syntax error.

the question is, why i do not need to quote the second argument (2),
even when it too is delivered to the function as a string and not as
int?

-- juha



More information about the sr-dev mailing list