Calling a Function

Functions return a value. You can display, capture, or use the return value, depending on how you call it.

To call a function

  • Use the = (equal) operator, followed by the function name and parentheses that contain any parameters you pass to the function.

    =cMyUDF()
    =cMyUDF(p1,p2)
    
  • You can also omit the = (equal) operator. For example,

    cMyUDF()
    cMyUDF(p1,p2)
    

In other words, = is optional.

You should avoid using a ? before a function call because ? will send output to the screen.

If you omit the RETURN statement in a UDF, the default return value is true (.T.).

See Also

= Command | RETURN Command | User-Defined Functions | Data Manipulation