2008-12-02 12:48 PM
2008-12-02 01:50 PM
2008-12-02 03:16 PM
2008-12-02 04:57 PM
rocorona wrote:Roberto,
this could be true, but we know that undeclared variables are initialized as numbers.
And, in fact, if I test it (at the script first line) with VARTYPE (zero) it says is "1" (number) not "2" (string).
Just discovered that an explicit use of "zero" as number (before the first DEFINE command) seems to "force" a declaration.
For examples, using a simple
x=zero+zero
the error message disappears.
2008-12-03 02:49 PM
2008-12-03 04:24 PM
isOkToStartFomZero = 0 shouldStartFrom3 = 3AC13 will have a GDL warning to warn developers about uninitialized variables. It helps you stay in picture about what is happening.
2008-12-03 04:39 PM
ztaskai wrote:Good point.
When using numeric variables, you should initialize them before their value is used for the first time. The good way to do this is the following for a variable which is OK to start from a given constant:
isOkToStartFomZero = 0 shouldStartFrom3 = 3AC13 will have a GDL warning to warn developers about uninitialized variables. It helps you stay in picture about what is happening.
Regards,
Zsolt
2008-12-03 06:47 PM
ztaskai wrote:Just to tease us a little... In a scale of -10 to 10 which do you think will be our impression about AC13 GDL new features?...
AC13 will have a GDL warning to warn developers about uninitialized variables. It helps you stay in picture about what is happening.
2008-12-03 07:06 PM
ztaskai wrote:That's great news, Zsolt.
AC13 will have a GDL warning to warn developers about uninitialized variables.
2008-12-04 12:04 PM
ztaskai wrote:What would also be good is to extend this behavior to all error cases in GDL, not just uninitialized variable. I could even imagine ArchiCAD giving an advice in the error message on how to fix it.
AC13 will have a GDL warning to warn developers about uninitialized variables.