Home

Function Call Statement

Every function call statement must include a (possibly empty) parameter list inside parentheses. Every function call statement must be terminated by a semicolon.

You can even call a function that returns a value with a function call statement. The return value is simply ignored.

// Call a function without parameters.
DoSomething();

// This is a valid statement, but it doesn't do what you
// expect, because it isn't a function call statement.
DoSomething;

// This is a valid albeit useless statement--the return
// value is discarded.
abs(5);

// Call a function with parameters, which are separated by
// commas:
DoSomethingElse(x, y, z);

// A function can have default values for one or more
// parameters!
DoSomethingElse();

Home


Questions or comments to phil@munts.net