Starting Delphi programming
Setting up a Delphi environment
Tutorial by Kulverstukas for Evilzone
Contents _0x00 -
Delphi0x01 -
Software0x02 -
Starting Delphi programming0x00 - DelphiDelphi - another word for "Object Pascal" given by "Borland", now known as "Embarcadero". First there was "Pascal" - for command line programming, and then it became "Object Pascal" - for OOP programming. Today, Borland a.k.a Embarcadero is still developing the Delphi language and is closed source and not free. There are ofcourse free ones, like FreePascal which is also Open Source. FreePascal by itself is a compiler. There are IDE's for FreePascal too. More on that later.
Delphi is also CrossPlatform
0x01 - SoftwareTo compile any of the Delphi projects you will need a compiler and an IDE. To view the source you should only need a notepad.
WindowsBorland Delphi can be downloaded once you pay for it (or you know where to get it...) or you can use an alternative - Lazarus which uses FreePascal compiler that is maintained by a large community and the main IDE - Lazarus is always updated and maintained. Since I am more of a Open Source person, I will focus more on Lazarus. Before I go deeper I must say that Lazarus supports converting Borland Delphi projects/packages into it's own (Lazarus) projects and packages, ofcourse Lazarus does not have the same libraries that Borland Delphi has so when converting - you should take into consideration that it may not work so you will have to re-write the code. It's ofcourse a good idea to have 2 IDE's.
Lazarus:
http://www.lazarus.freepascal.org/FreePascal compiler:
http://www.freepascal.org/0x02 - Starting Delphi programmingProgramming in Delphi is very easy. I assume that you are creating a GUI application, since that is the default when you open Lazarus. So without further confusion click on a Button component in Component palette and drop it onto your form, drop a Label component aswell. Now double click the button component on the form and start programming! here are few code samples:
Simple Hello World print
Label1.Caption := 'Hello World!';
Variable print
Variable1 := "Hello World!";
Label1.Caption := Variable1;
Math + print
Var1 := 10;
Var2 := 10;
Var3 := Var1 + Var2;
Label1.Caption := Var3;
A great site for learning the basics:
http://delphi.about.com/ and
http://www.delphibasics.co.uk/A great site for a quick reference about Run-Time Library:
http://www.freepascal.org/docs-html/rtl/Good site with tutorials for intermediate Delphi programmers:
http://codegearguru.com/index.php?option=com_content&task=blogsection&id=4&Itemid=27