On Sat, Jan 28, 2017 at 11:53 AM, Kirk Brooks <[email protected]> wrote:
> But that's obviously only useful when all the params after $2 are
> pointers. Is it the case (now) that param indirection only works on
> similarly typed params?
>
> I didn't think indirection was limited like this.
>
Kirk:
Yup, that's the behavior. The curly braces instruct the compiler to treat
parm $n and all subsequent parameters as being of the same type.
From the Compiler 2.5 docs:
"Parameter Indirection
4D Compiler manages the power and versatility of parameter indirection. In
interpreted mode, 4th Dimension gives you a free hand with numbers and data
types of parameters. You retain this freedom in compiled mode, provided you
do not introduce data type conflicts and that you do not use more
parameters than you passed in the calling procedure.
To prevent possible conflicts, parameters addressed by indirection must all
be of the same data type.
This indirection is best managed if you respect the following convention:
if only some of the parameters are addressed by indirection, those
parameters should be passed after the others.
Within the procedure, an indirection address is formatted: ${$i}, where $i
is a numeric variable. ${$i} is called a generic parameter."
--
Douglas von Roeder
949-336-2902
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ: http://lists.4d.com/faqnug.html
Archive: http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:[email protected]
**********************************************************************