[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: snmpconf #4: Code reuse

>>>>> On Mon, 02 Apr 2001 15:51:46 -0400, Pablo Halpern <phalpern@newview.org> said:

Pablo> I think #4 (a gosub(function-number) call) could be extended to
Pablo> take a single additional argument, which would be retrieved by
Pablo> the called function the same way policy arguments are
Pablo> retrieved.

I thought about that.  That truly becomes "function like" except the
naming convention for the function is by the code reference number
rather than a name.

Anyway, as long as we're talking about it, I'd rather shoot for the
moon and say a variable number of arguments could be added (we already
have sprintf taking a variable number of arguments so the capability
to deal with it is already present in some fashion).

But then, I'd rather define a real function and reference it by name.

I *suppose* that a decent script compiler could let you define a
function and then convert it into gosub()s or changing all the text to
inline (required by the mib now), but then its non-standardized and
the code isn't portable from manager to manager.

Wes Hardaker
NAI Labs
Network Associates