Topic : C-Language Documentation Author : John Kormylo Version : C.HYP 1.0 Subject : Documentation/C-Language Nodes : 233 Index Size : 6362 HCP-Version : 3 Compiled on : Atari @charset : atarist @lang : en @default : @help : Help @options : +g -i -s +x +z -t4 @width : 75 View Ref-File[ Functions ] Functions break the work of the program into smaller (hopefully reusable) segments. The values of the parameters are passed to the function and a single value is returned. Any changes to the parameters inside the function will not affect the calling routine. Execution returns to the calling routine using the return statement. Void functions can use 'return;' or 'return(void);', or use the implied return at the end of the local block }. Additional information can be returned by passing the addresses of the variables to be changed, or by using global or static variables. Parameters of the form 'array[]' and '*array' are equivalent. ANSI Definition K&R Definition Prototyping Calling main Variable Argument Lists Function Pointers Parameter Passing Note: functions can even call themselves, creating a new set of local variables on the stack.