Refer to parameters within if statement
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā2016-04-07 12:12 PM
ā2016-04-07
12:12 PM
As a newbie in GDL, I can't get how to get together string and numbers.
My case:
I have parameters: a1, a2, a3, a4, a5 etc... with the same values
I want to create an if statement with all of the parameters, but it doesn't work, I can not create a right script to describe the parameters
for i=1 to 10 if a+str(i) = something then ....build something.... else ....build something else.... endif next i
if I want to loop with values, it works, but I don't get why, and how to
for i=1 to 10 value "a"+str(i,1,0) param1, param2 next ican somebody explane it to me?
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā2016-04-08 08:41 AM
ā2016-04-08
08:41 AM
You can't concatenate variable names like this in GDL (although you can in other languages). To do the same thing, use an array. These are declared using the DIM statement e.g. DIM arrayName[]
Bruce Walker
Barking Dog BIM YouTube
Mindmeister Mindmap
-- since v8.1 --
AC27 5060 INT Full | Windows 11 64 Pro | 12th Gen Intel i7-12700H 2.30 GHz | 64 Gb RAM | NVIDIA GeForce RTX 3060 32 Gb
Barking Dog BIM YouTube
Mindmeister Mindmap
-- since v8.1 --
AC27 5060 INT Full | Windows 11 64 Pro | 12th Gen Intel i7-12700H 2.30 GHz | 64 Gb RAM | NVIDIA GeForce RTX 3060 32 Gb