*/
Know a good article or link that we're missing? Submit it!
*/

View \FUNCTION.PAS

This is the second disk of the PASCAL TUTOR system. It has the

Submitted By: WEBMASTER
Rating: (Not rated) (Rate It)


(* Chapter 5 - Program 6 *)
program Example_Function;

var Dogs,Cats,Feet : integer;

function Quad_Of_Sum(Number1,Number2 : integer) : integer;
begin
   Quad_Of_Sum := 4*(Number1 + Number2);
end;

begin  (* main program *)
   Dogs := 4;
   Cats := 3;
   Feet := Quad_Of_Sum(Dogs,Cats);
   Writeln(' There are a total of',Feet:3,' paws.');
end(* of main program *)

corner
© 1996-2008 CommunityHeaven LLC. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
North American business development: Nicolai Wadstrom. Publisher: Lars Hagelin.