This is way a function should just do it's job (return a value) rather then having side effects like
change of Parameters
Output
....
VFP's style to mix up function and procedure (determination by the way to
call instead of definition) makes this very unclear.
Lutz
>In one of my apps I just found and fixed a subtle edge-case bug caused by short-circuiting of logical operators. With my coding style I'm not usually vulnerable to it so it was interesting to be reminded of this feature of VFP.
>
>LOCAL ;
> llFlag
>
>llFlag = .F.
>
>CLEAR
>
>IF MyUDF( "First Argument" ) AND llFlag
>
>ENDIF
>
>IF llFlag AND MyUDF( "Second Argument" )
>
>ENDIF
>
>RETURN
>
>FUNCTION MyUDF ( tcArgumentPosition AS String )
>
>?"MyUDF( ) called when it is " + tcArgumentPosition
>
>ENDFUNC
>
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord
Weeks of programming can save you hours of planning.
OffThere is no place like [::1]