RosettaCodeData/Task/Function-definition/XPL0/function-definition.xpl0

9 lines
446 B
Text
Raw Permalink Normal View History

2013-04-10 22:43:41 -07:00
func Multiply(A, B); \the characters in parentheses are only a comment
int A, B; \the arguments are actually declared here, as integers
2014-01-17 05:32:22 +00:00
return A*B; \the default (undeclared) function type is integer
2013-04-10 22:43:41 -07:00
\no need to enclose a single statement in brackets
func real FloatMul(A, B); \floating point version
real A, B; \arguments are declared here as floating point (doubles)
return A*B;