Skip to content

Instantly share code, notes, and snippets.

@freeonterminate
Created November 11, 2016 08:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save freeonterminate/e71984aa56adcf8dac7063eb3e5b5dff to your computer and use it in GitHub Desktop.
Save freeonterminate/e71984aa56adcf8dac7063eb3e5b5dff to your computer and use it in GitHub Desktop.
Semicolonless Delphi
{$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