Function definition: Difference between revisions
Content added Content deleted
Langurmonkey (talk | contribs) |
m (Dialects of BASIC moved to the BASIC section. QuickBASIC moved to its alphabetical position.) |
||
Line 662: | Line 662: | ||
=={{header|BASIC}}== |
=={{header|BASIC}}== |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
==={{header|Applesoft BASIC}}=== |
==={{header|Applesoft BASIC}}=== |
||
Line 770: | Line 764: | ||
<syntaxhighlight lang="freebasic">#Define multiply(d1, d2) (d1) * (d2)</syntaxhighlight> |
<syntaxhighlight lang="freebasic">#Define multiply(d1, d2) (d1) * (d2)</syntaxhighlight> |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
==={{header|Gambas}}=== |
==={{header|Gambas}}=== |
||
Line 958: | Line 966: | ||
{{out}} |
{{out}} |
||
<pre> 3.703680038452148</pre> |
<pre> 3.703680038452148</pre> |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
==={{header|REALbasic}}=== |
==={{header|REALbasic}}=== |
||
Line 1,047: | Line 1,063: | ||
return a * b |
return a * b |
||
end sub</syntaxhighlight> |
end sub</syntaxhighlight> |
||
==={{header|Xojo}}=== |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
==={{header|ZX Spectrum Basic}}=== |
==={{header|ZX Spectrum Basic}}=== |
||
Line 1,827: | Line 1,850: | ||
let multiply (x: i32, y: i32) : i32 = x * y |
let multiply (x: i32, y: i32) : i32 = x * y |
||
</syntaxhighlight> |
</syntaxhighlight> |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
=={{header|GAP}}== |
=={{header|GAP}}== |
||
Line 3,609: | Line 3,618: | ||
<syntaxhighlight lang="scheme">(define multiply |
<syntaxhighlight lang="scheme">(define multiply |
||
(lambda (x y) (* x y)))</syntaxhighlight> |
(lambda (x y) (* x y)))</syntaxhighlight> |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
=={{header|XPL0}}== |
=={{header|XPL0}}== |