hi,
while playing around with modules, i observed the following:
variables in modules are readonly, when accesses directly, and trying to change them from the outside gives an error.
however trying to change then from the inside is either silently ignored or succeeds:
int i=7; string s="foo"; mapping dict = ([ "foo":8 ]); array list = ({ 5 }); multiset mset = (< "foo" >);
void set(mixed var) { // ignored: i=(int)var; s[0]=((string)var)[0]; dict += ([ "baz":var ]); list +=({ var }); list[0] = (int)var;
// succeeds: dict->foo=var; dict->bar=var; mset[var] = 1; mset += (< var >); }
shouldn't all of them fail and produce an error?
greetings, martin.