Skip to content

Instantly share code, notes, and snippets.

@omonien
Created July 16, 2020 18:50
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 omonien/b00c9ab20b19c8b85db15dd94f1a5dcd to your computer and use it in GitHub Desktop.
Save omonien/b00c9ab20b19c8b85db15dd94f1a5dcd to your computer and use it in GitHub Desktop.
Byte Array example
program Project46;
{$APPTYPE CONSOLE}
{$R *.res}
uses
System.SysUtils;
var
SomeBytes: TBytes;
SomeByte: Byte;
begin
try
SetLength(SomeBytes, 2);
SomeBytes[0] := $00;
SomeBytes[1] := $01;
for SomeByte in SomeBytes do
begin
WriteLn(SomeByte.ToString);
end;
except
on E: Exception do
WriteLn(E.ClassName, ': ', E.Message);
end;
Readln;
end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment