Why do you think it is unstable Quote It seems as though you are safer passing the field value to a variable prior to passing to the function. TField has its own conversion properties, such as AsInteger, ie. 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. Quote 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. Quote Remy Lebeau (TeamB) wrote: D-Fan wrote in message news. It seems as though you are safer passing the field value to a variable prior to passing to the function. 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. Just assign it directly, ie: Variant v1 12345 int i v1 v 12345.0 float f v Gambit.
0 Comments
Leave a Reply. |