Created
November 11, 2016 08:27
-
-
Save freeonterminate/e71984aa56adcf8dac7063eb3e5b5dff to your computer and use it in GitHub Desktop.
Semicolonless Delphi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{$WARNINGS OFF} | |
begin | |
(procedure(F: array of const)begin end)([ | |
// 定番のやつ | |
(function(const Count: Integer): Integer | |
begin | |
for Result := 0 to Count - 1 do | |
Writeln('Good-bye, semicolon world !') | |
end | |
)(3), | |
// FizzBuzz | |
(function: Byte | |
begin | |
for Result := 1 to 100 do | |
(procedure(S: array of Variant) | |
begin | |
Writeln(S[Ord(S[0] mod 3 = 0) or (Ord(S[0] mod 5 = 0) shl 1)]) | |
end) | |
([Result, 'Fizz', 'Buzz', 'FizzBuzz']) | |
end | |
)(), | |
// Enter 押されるまで待つ | |
(function: Byte | |
begin | |
Readln | |
end | |
)() | |
]) | |
end. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment