Greatest common divisor: Difference between revisions

Content added Content deleted
(Improved example moved to main page)
m (Helping adjust submission from first-time user)
Line 3,412: Line 3,412:
_gcd( abs(a), abs(b) )</syntaxhighlight>
_gcd( abs(a), abs(b) )</syntaxhighlight>


=={{header|FutureBASIC}}==
=={{header|FutureBasic}}==
This is a nearly-trivial 6-line function, so we've dressed it up a bit to show how easily FutureBASIC builds a full, interactive application. In FB, when you complete your code and hit RUN, the built app can open in as little as 3 seconds.
This is a nearly-trivial 6-line function, so we've dressed it up a bit to show how easily FB builds a full, interactive application. In FB, when you complete your code and hit RUN, the built app can open in as little as 3 seconds.


[[File:New_app_in_finder.png|200px|frameless]]
[[File:New_app_in_finder.png|200px|frameless]]
Line 3,426: Line 3,426:
[[File:Running_app.png|280px|frameless]]
[[File:Running_app.png|280px|frameless]]


<syntaxhighlight lang="FutureBASIC">
<syntaxhighlight lang="futurebasic">
begin enum 1 // Object tags
begin enum 1 // Object tags
_fldA
_fldA
Line 3,483: Line 3,483:
on dialog fn doDialog
on dialog fn doDialog
handleevents
handleevents

</syntaxhighlight>
</syntaxhighlight>
{{output}}
{{output}}
[[File:GCD_of_1234567890_and_9876543210.png|200px|framed]]
[[File:GCD_of_1234567890_and_9876543210.png|200px|framed]]




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