![]() You can pass the Variant to the parameter directly, and it will convert the same way as it does being assigned to a variable. If the function takes an 'int' as a parameter, then there is no need to use a separate variable. > Sometimes I use pass variants into routines where the type is > of integer and it works, but I find it safest to assign the variant > to an integer variable and pass the new variable to the funtion. ![]() 'D-Fan' wrote in message > There are functions for VarToStr, etc. ![]() Conversion between different variant types is noramally automatic. It seems as though you are safer passing the field value to a variable prior to passing to the function. This is not a stable practice even though the value is a number at the time of the operation. More specifically I am speaking of situations where I am passing a tfield as in ' ds.fieldbyname('var').value ' as an integer value parameter. Sometimes I use pass variants into routines where the type is of integer and it works, but I find it safest to assign the variant to an integer variable and pass the new variable to the funtion. I have done this but I wasn't sure that it is best practice.
0 Comments
Leave a Reply. |