This file contains hidden or 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
program FizzBuzzHelper; | |
uses | |
System.SysUtils; | |
type | |
TFizzBuzzHelper = record helper for Integer | |
function ToFizzBuzz: String; | |
end; |
This file contains hidden or 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
program FizzBuzz; | |
uses | |
System.SysUtils; | |
var | |
i: Integer; | |
Values: array [0.. 3] of String = ('', 'Fizz', 'Buzz', 'FizzBuzz'); | |
begin | |
for i := 1 to 100 do | |
begin | |
Values[0] := i.ToString; |
This file contains hidden or 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
program 半沢直樹; | |
uses | |
System.SysUtils; | |
type | |
T半沢直樹 = record helper for Single | |
function 倍返し: Double; | |
end; |
This file contains hidden or 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
program 小木曽; | |
uses | |
System.SysUtils; | |
type | |
T小木曽 = record helper for String | |
function バンバン: String; | |
end; |
This file contains hidden or 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
program ForQuiz; | |
var | |
Count: Integer; | |
i: Integer; | |
begin | |
Count := 3; | |
for i := 0 to Count - 1 do begin | |
Inc(Count); //→ Count := Count + 1; | |
Writeln(i); // 数字はいくつまで表示される? |
This file contains hidden or 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
unit uStyleProvider; | |
(* | |
以下のように利用します | |
procedure TForm1Create(Sender: TObject); | |
var | |
StyleName: String; | |
begin | |
// 生成 |
This file contains hidden or 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
unit uNSAppSample; | |
interface | |
implementation | |
{$IFDEF MACOS} | |
uses | |
// Delphi の RTL | |
System.SysUtils, System.Generics.Collections, |
This file contains hidden or 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
program Project1; | |
uses | |
System.SysUtils; | |
type | |
// Sample Interface | |
IFoo = interface | |
['{174C7089-888D-4B3A-A348-DBAEC0AA70A5}'] | |
function GetBar: String; |
This file contains hidden or 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
// ARGB を ABGR に変換 | |
// IsRev が True の時 ABGR(PixelFormat が pfA8B8G8R8) | |
function GetColor(const iColor: TAlphaColor): TAlphaColor; | |
{$IFDEF CPUX86} | |
asm | |
cmp byte ptr IsRev, 0 | |
jz @@exit | |
rol eax, 8 | |
bswap eax | |
@@exit: |
OlderNewer