Ok, so we're going to make a fun little loop, so open up Delphi (I'm using Delphi 7)
now, you'll have your empty application, with all your options, etc.
Double click the form to go to the formCreate area of the program.
now, make a new line above the begin, and type the following:
this declares the variable 'x' as an integer, or whole number, so whenever we use 'x' in the program, it will assosiate it with this variable.
now below the begin type this:
what does this do?
^^This assigns the value 0 to 'x'
^^This is the condition used for our while do loop, it checks to see if x is a number less then 1, if it is, it does whatever is after the 'do'
^^This shows a popup on screen that says "Hello"
NOTE: There is no ';' after the do, this is because delphi registers the first semicolon in the while do loop as the end of the loop.
Now click the green play button in delphi to test your program, if it runs you did it right, congratulations! now have fun.
It's only basic, but it gives you a little delphi fun.
<3 TDD
now, you'll have your empty application, with all your options, etc.
Double click the form to go to the formCreate area of the program.
now, make a new line above the begin, and type the following:
Code:
var x: integer;
this declares the variable 'x' as an integer, or whole number, so whenever we use 'x' in the program, it will assosiate it with this variable.
now below the begin type this:
Code:
x := 0;
while x < 1 do
alert('Hello');
what does this do?
Code:
x := 0;
Code:
while x < 1 do
Code:
alert('Hello');
NOTE: There is no ';' after the do, this is because delphi registers the first semicolon in the while do loop as the end of the loop.
Now click the green play button in delphi to test your program, if it runs you did it right, congratulations! now have fun.
It's only basic, but it gives you a little delphi fun.
<3 TDD



