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:


tabular1568

or the ANSI C syntax:


tabular1574

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 displays a warning to avoid surprises. This default protection can be changed with the debugmode() function (see §6.6.4 page gif).



Lionel Fournigault
Wed Apr 30 10:44:37 MET DST 1997