
02-27-2005, 04:21 AM
|
|
Graal Administration
|
Join Date: Jan 2000
Location: Admins
Posts: 11,693
|
|
|
Yes you need to use strtofloat if you want to make sure it is a number, there is no way to avoid that. It is really needed for compatibility with old Graal script:
set varname; -> translated into varname = true; -> varname = 1;
unset varname; -> translated into varname = false; -> varname = 0; -> var is removed
In old Graal script the if (varname) command is just checking if the variable is existing, not if the value is non-zero. So to make unset work correctly it needs to remove the variable. This is also very nice for removing data that is not needed anymore, just set it to zero or empty string for removing it. |
|
|
|