[sr-dev] setbflag

Daniel-Constantin Mierla miconda at gmail.com
Mon Jun 1 18:27:37 CEST 2009



On 06/01/2009 07:18 PM, Juha Heinanen wrote:
> Daniel-Constantin Mierla writes:
>
>  > well, a quick look at config grammar and it seems that the module 
>  > functions accept integer parameters. I was not aware of and don't know 
>  > how they are passed to the function call. In K module functions are only 
>  > with string parameters.
>
> if i write 
>
> isbflagset("15")
>
> is "15" evaluated to the bit during compilation of the script or is "15"
> processed like a string that contains pseudo variables?
>   
it is evaluated to integer and at runtime calls the core function 
setbflag() that does shift and set operation.

>  > Even in SR I cannot see the way to specify the type of the parameters 
>  > for module functions. Is there an example?
>
> in my opinion, in the above case, because the function requires an int
> argument, only these two should be accepted:
>
> isbflagset(int)
>
> isbflagset($pv)
>
> both without quotes and $pv has to contain an int value.
>   

The question is how I specify to a function exported by a module that 
the parameter is integer. While the config grammar accepts such case, 
the interface does not offer a way to do it (or I am missing something).

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
http://www.asipto.com/




More information about the sr-dev mailing list