* X more docs for C
[mascara-docs.git] / C / the.ansi.c.programming.language / c.programming.notes / sx14d.html
blobb014e7afae2d09302e7f5e3f3c572be14e9c914a
1 <!DOCTYPE HTML PUBLIC "-//W3O//DTD W3 HTML 2.0//EN">
2 <!-- This collection of hypertext pages is Copyright 1995, 1996 by Steve Summit. -->
3 <!-- This material may be freely redistributed and used -->
4 <!-- but may not be republished or sold without permission. -->
5 <html>
6 <head>
7 <link rev="owner" href="mailto:scs@eskimo.com">
8 <link rev="made" href="mailto:scs@eskimo.com">
9 <title>Functions</title>
10 <link href="sx14c.html" rev=precedes>
11 <link href="sx14e.html" rel=precedes>
12 <link href="sx14.html" rev=subdocument>
13 </head>
14 <body>
15 <H2>Functions</H2>
17 <p>Functions can't return arrays,
18 and it's tricky to write a function as if it returns an array
19 (perhaps by simulating the array with a pointer)
20 because you have to be careful about allocating the memory that
21 the returned pointer points to.
22 </p><p>The functions we've written have all accepted a well-defined,
23 fixed number of arguments.
24 <TT>printf</TT> accepts a variable number of arguments
25 (depending on how many <TT>%</TT> signs there are
26 in the format string)
27 but we haven't seen how to declare and write functions that do this.
28 </p><hr>
29 <p>
30 Read sequentially:
31 <a href="sx14c.html" rev=precedes>prev</a>
32 <a href="sx14e.html" rel=precedes>next</a>
33 <a href="sx14.html" rev=subdocument>up</a>
34 <a href="top.html">top</a>
35 </p>
36 <p>
37 This page by <a href="http://www.eskimo.com/~scs/">Steve Summit</a>
38 // <a href="copyright.html">Copyright</a> 1995, 1996
39 // <a href="mailto:scs@eskimo.com">mail feedback</a>
40 </p>
41 </body>
42 </html>