Cancel
Showing results for 
Search instead for 
Did you mean: 

Return Value

Solution Partner Pioneer Solution Partner Pioneer
Solution Partner Pioneer

hello guys,

Is it possible to return more than 1 value of method? I want to return Line and i. Is there different syntax when there are more than 1 return value?

 

Thank you

Snímka.PNG

3 REPLIES 3

Re: Return Value

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor
a Method can have only one return value, if you want to "return" more values, you can define parameters as reference

--> see help: byRef
Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: Return Value

Legend
Legend

You could always try to return an array. Depending on what you want to send back.
This method returns an array formatted by the any data-type containing the two parameters.

param firstValue : string, secondValue : integer -> any[]

result.append(firstValue)
result.append(secondValue)


Of course, you need to make sure that you know which result is which.

Re: Return Value

Solution Partner Pioneer Solution Partner Pioneer
Solution Partner Pioneer

Thank you, it helps Smiley Happy