3. Statements : OpenROAD Language Statements : Procedure Statement : Examples—Procedure Statement
 
Share this page                  
Examples—Procedure Statement
Define a procedure that adds the appropriate tax to a given money value:
procedure addtax (
     tax = float,
     amount = money
) =
begin
     return amount + amount*tax;
end
Define a procedure that displays a message (no variables needed):
procedure printmsg =
begin
     message 'Here is a message';
end