isnum() on ref.vars in Developer Help
|
|
Code:
encrypt(atom/ref,g) var/n=0 var/t=0 for(var/a in ref.vars) world<<ref.vars[a] if(isnum(ref.vars[a])) n++ if(!(n%g))t/=n else t*=n return t
|
Problem description:
Most vars are a num, but isnum() isn't picking it up! Is there anyway to fix this?
|
Indeed; you have to stop assuming those vars are actually numbers. If isnum() says they aren't, they aren't. They're really a string or something else.
Lummox JR