invalid non-declared variable

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2008-12-02 12:48 PM
‎2008-12-02
12:48 PM
In a master script:
DEFINE TRANSLUCENT_FILL "test1" zero,2,3,4,5,6,7,8, 0.25
zero=0
DEFINE TRANSLUCENT_FILL "test2" zero,2,3,4,5,6,7,8, 0.25
when checking these instructions, ArchiCAD reports "insufficient parameters" for the first DEFINE, where a non-declared variable is used.
Thes second one is copy-pasted, to avoid any possible difference, but the zero is declared, and it works.
--Roberto Corona--
_________________
--Roberto Corona--
www.archiradar.com
AC18 - ITA full on Win10
_________________
_________________
--Roberto Corona--
www.archiradar.com
AC18 - ITA full on Win10
_________________
_________________
13 REPLIES 13
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2008-12-04 12:23 PM
‎2008-12-04
12:23 PM
Hi Laszlo,
The lack of detail in a error message is directed linked to the enthusiasm for a software...
I mean... a new user who reads the actual AC error messages looses a considerable portion of enthusiasm as it doesn't point to a detail solution for the error.
Huge impact and very simple to implement...
Good idea Laszlo!...
The lack of detail in a error message is directed linked to the enthusiasm for a software...
I mean... a new user who reads the actual AC error messages looses a considerable portion of enthusiasm as it doesn't point to a detail solution for the error.
Huge impact and very simple to implement...
Good idea Laszlo!...

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2008-12-09 12:02 PM
‎2008-12-09
12:02 PM
ztaskai wrote:
When using numeric variables, you should initialize them before their value is used for the first time.
[...]
Zsolt
As an old BASIC programmer, I absolutely agree that declared variables are "safer" and a good programming practice.
I only noticed that strangeness when copying-pasting the syntax from the GDL manual for a quick test.
The worst, as pointed out by others, is the cryptic error message ("insufficient parameters").
Anyway, the same use of an undeclared variable, works without problems in "old" Define Fill.
DEFINE FILL "testfill" undeclared, 2, 3, 4, 5, 6, 7, 8,
1, 0.0, 2,
0.1, 0.0, 0.0, 0.0, 0,
0.1, 90.0, 0.0, 0.0, 0,
1.0, 1.0
_________________
--Roberto Corona--
www.archiradar.com
AC18 - ITA full on Win10
_________________
_________________
--Roberto Corona--
www.archiradar.com
AC18 - ITA full on Win10
_________________
_________________

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2008-12-10 08:34 AM
‎2008-12-10
08:34 AM
Hi all,
Yes, non-declared variables will keep working. They are always considered as numeric variables with the value of zero.
And yes, we should have better error messages. I don't think we can change them all in one big chunk but we'll try to go in the proposed clearer direction with new messages and when touching old ones.
About AC13 and GDL... I'm really happy about the fixes and changes we make but I'm afraid only one of the fundamental problems will be solved. I will post a summary about the little and bigger changes when we enter alpha phase. Feel free to remind me in case I appear to forget about that.
Regards,
Zsolt
Yes, non-declared variables will keep working. They are always considered as numeric variables with the value of zero.
And yes, we should have better error messages. I don't think we can change them all in one big chunk but we'll try to go in the proposed clearer direction with new messages and when touching old ones.
About AC13 and GDL... I'm really happy about the fixes and changes we make but I'm afraid only one of the fundamental problems will be solved. I will post a summary about the little and bigger changes when we enter alpha phase. Feel free to remind me in case I appear to forget about that.
Regards,
Zsolt
Zsolt Táskai
ArchiCAD Development - GDL Team
AC13, AC14 and upwards...
ArchiCAD Development - GDL Team
AC13, AC14 and upwards...
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2008-12-10 10:49 AM
‎2008-12-10
10:49 AM
Thank you very much for your feedback Zsolt.

ztaskai wrote:I'm looking foward!
I will post a summary about the little and bigger changes when we enter alpha phase.
- « Previous
-
- 1
- 2
- Next »
- « Previous
-
- 1
- 2
- Next »