2010-03-06 01:11 AM
2010-03-06 01:32 AM
CALL "macro name" PARAMETERS A = 1, B = 2, something = "nothing" !etc...For more details look up the CALL statement in the GDL Ref Manual (page 222 in my copy).
2010-03-06 01:52 AM
Anne wrote:No, there isn't any way to define functions in a GDL script, at least not in the same sense as other languages (or indeed the functions in GDL itself). The method of calling macros suggested by Matthew is similar, but messy - I avoid using macros wherever possible.
I'm really missing the possibility to pass arguments to subroutines in GDL.
Is it really so there are no possibility to do that, or is it just I that has avoided to find information about it?
2010-03-06 05:29 PM
2010-03-08 06:08 PM
EXIT x + yNow, to call the function use the following code in another object
CALL "function" PARAMETERS x = x_value, y = y_value, RETURNED_PARAMETERS sumNow the new object will have a variable, sum, which is assigned the value x_value+y_value since those were the values into x and y.
2010-03-08 08:01 PM