The keywords are similar. But they do not require the use of white space to separate statments, instead they use begin, end and semi colons. White space is allowed of course and recommended.
VB Code:
If condition Then
statements
End If
If condition Then
statements
Else
statements
End If
If condition OR condition Then
statements
End If
For var = 1 To 10
statements
Next var
While condition
statements
Wend
Do While Condition
statements
Loop
Do
statements
Loop Until condition
Pascal
Code:
if condition then
begin
statements;
end;
if condition then
begin
statement;
statement;
end
else
begin
statements;
end;
if (condition) OR (condition) then
begin
statements
end;
for var := 1 to 10 do
begin
statements;
end;
for var := 10 downto 1 do
begin
statements;
end;
while condition do
begin
statements;
end;
reapeat
statements;
until; condition;
Pascal also has an assignment operator as well as an equality operator. Hence the following code assigns the value of a to be:
b := a;
Where as this tests whether a is equal to b:
a = b;