[Delphi] Basic Delphi syntax.
I will show you some basic Delphi syntax. It's kinda dead language, but it's flexible and you can easily write complex apps in it.
Speed comparing?
VB < Delphi = C# < C++ < ASM
So don't doubt in it's speed.
PHP Code:
//We declare that this is a program with name: "Delhpi".
program Delphi;
//Application type is: CONSOLE.
{$APPTYPE CONSOLE}
//Program uses. Like "INCLUDE" in C++.
uses
SysUtils;
//We write our variables here.
//Integer, string, etc, etc, etc... Default stuff.
var
X, Y : integer;
//We begin to write our code and procedures here.
begin
//Some useless and fancy beginning introduction.
//WriteLn = Write Line.
WriteLn('Hello there, welcome to my frist program.');
//We declare X.
//ReadLn = Read Line.
ReadLn(X);
//We declare Y.
ReadLn(Y);
//Now we add these numbers together and print result.
//IntToStr = Converts Integers to String value.
WriteLn('Result is: ' + IntToStr(X + Y));
//We need the program to wait for our input so it will not close after pervouse statement.
ReadLn;
end.
If you like this syntax you can search google for resources and start learning it. It's easy.
re: [Delphi] Basic Delphi syntax.
Its very similar to SCAR, i know it pretty well if I may say =)
re: [Delphi] Basic Delphi syntax.
Looks a little bit like ASM in the way it's written (program, end, etc...).
You can even make it more difficult / time intensive then ASM, you know? Look at brainfuck :P
re: [Delphi] Basic Delphi syntax.
It's not quite a tutorial. It's just showing the syntax. I can write a tutorial a it later about how can you use it to create joke programs and viruses.
Delphi is good language for n00b virus writers because it does not req any frameworks, just windows OS.
Re: [Delphi] Basic Delphi syntax.
I wanted to get into Delphi back in the day (mainly its popular in the Malware community) but I didn't like the IDE its too weird for me, too much crap, it has sooo much........... But not a bad language ;P still it doesn't outperformanc VB.NET unless you're saying Delphi is NOT like C# considering C# is .NET and all .NET languages have the same 'powers'
Re: [Delphi] Basic Delphi syntax.
Basic SCAR Script:
PHP Code:
program New;
{.include SRL/SRL.scar}
var I : Integer;
const
RepeatTimes = 10; //Repeat x times
function TypeTheText(text: string): Boolean;
begin
SendKeys(text+Chr(13));
end;
begin
SetupSRL;
repeat
TypeTheText('Hello World!');
I := I + 1;
until(I = RepeatTimes);
end.
That's equal to:
PHP Code:
program New;
{.include SRL/SRL.scar}
var I : Integer;
const
RepeatTimes = 10; //Repeat x times
begin
SetupSRL;
repeat
SendKeys('Hello World'+Chr(13));
I := I + 1;
until(I = RepeatTimes);
end.
Using procedures and/or functions is really handy.