Function definition: Difference between revisions

Content added Content deleted
imported>Acediast
(→‎{{header|COBOL}}: replaced superfluous implementations with standards)
m (Move FutureBasic entry out of BASIC group)
Line 687: Line 687:


<syntaxhighlight lang="freebasic">#Define multiply(d1, d2) (d1) * (d2)</syntaxhighlight>
<syntaxhighlight lang="freebasic">#Define multiply(d1, d2) (d1) * (d2)</syntaxhighlight>

==={{header|FutureBasic}}===
<syntaxhighlight lang="futurebasic">window 1

local fn multiply( a as long, b as long ) as long
end fn = a * b

print fn multiply( 3, 9 )

HandleEvents</syntaxhighlight>
Output:
<pre>
27
</pre>


==={{header|Gambas}}===
==={{header|Gambas}}===
Line 1,749: Line 1,735:
let multiply (x: i32, y: i32) : i32 = x * y
let multiply (x: i32, y: i32) : i32 = x * y
</syntaxhighlight>
</syntaxhighlight>

=={{header|FutureBasic}}==
<syntaxhighlight lang="futurebasic">window 1

local fn multiply( a as long, b as long ) as long
end fn = a * b

print fn multiply( 3, 9 )

HandleEvents</syntaxhighlight>
Output:
<pre>
27
</pre>


=={{header|GAP}}==
=={{header|GAP}}==