home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 1 / ARM_CLUB_CD.iso / contents / apps / program / a / c_interp / Examples / functions < prev    next >
Encoding:
Text File  |  1993-12-13  |  420 b   |  22 lines

  1. @* An example of function declaration and parameter passing *@
  2.  
  3. @*                         *@
  4. @* This is the entry point *@
  5. @*                         *@
  6. main()
  7. {
  8. printf("New record: %d\n",run_print("Bob",99));
  9. }
  10.  
  11.  
  12. @*                          *@
  13. @* This is our own function *@
  14. @*                          *@
  15. run_print(char *name, int record)
  16. {
  17. printf("Name:   %s\nRecord: %d\n",name,record);
  18. record++;
  19.  
  20. return record;
  21. }
  22.