Function definition



next up previous contents index
Next: Global variable definition Up: Smac definition Previous: Smac definition

Function definition

 

You must declare functions before use, but of course, when you define a function, you declare it at the same time. You can both use an old style to declare a function arguments list:

or the ANSI C syntax:

You cannot define a function with a variable number of arguments (ellipsis) , although some predefined functions use this facility (e.g. printf()). Classically, by default, the function return value type  and its parameters  type are int.

You cannot redefine  predefined functions, and when you redefine a user function or variable Xcoral displays a warning to avoid surprises. This default protection can be changed with the debug\_mode() function (see §6.6.4 page gif).



Lionel Fournigault
Mon Mar 6 13:33:34 MET 1995