cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to insert Array Values?

Hello everyone! I want to insert 10 arrays into this parameter. I have tested many ways to fail. I don't know what it does, please help me, thank you all.
1 Solution

Accepted Solutions
Barry Kelly
Moderator
You want an adjustable array - I think they call it a dynamic array.

As far as I know you can't have the user add new values directly to the array but you can create a new parameter that controls the size of the array.
DIM x []

for n = 1 to y
	x = value
NEXT n

PARAMETERS x=x
Where 'y' is a new parameter that sets size of the array.
'value' is the actual value you want to put into the array.

In this case value will be the same for each field in the array.
Unless you vary the value for each 'n' - i.e. value = value+1
DIM x []

for n = 1 to y
	x = value
	value = value+1
NEXT n

PARAMETERS x=x
Not sure if this will help or not.

Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

Go to post

4 Replies 4
Barry Kelly
Moderator
Select the row button and then insert as many as you need.
You can then select the values for each and add a default value if needed.

Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Anonymous
Not applicable
hi Barry Kelly !

Can I insert it in a 2D script? I want to use it to control the X coordinate but I cannot determine the number of points.
Barry Kelly
Moderator
You want an adjustable array - I think they call it a dynamic array.

As far as I know you can't have the user add new values directly to the array but you can create a new parameter that controls the size of the array.
DIM x []

for n = 1 to y
	x = value
NEXT n

PARAMETERS x=x
Where 'y' is a new parameter that sets size of the array.
'value' is the actual value you want to put into the array.

In this case value will be the same for each field in the array.
Unless you vary the value for each 'n' - i.e. value = value+1
DIM x []

for n = 1 to y
	x = value
	value = value+1
NEXT n

PARAMETERS x=x
Not sure if this will help or not.

Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Anonymous
Not applicable
Thank you for helping me solve the problem

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!