Selection

If and case statements in VB readily convert to their Pascal equivalents. Examples of Pascal code follow.

if  Mark >= PASS_MARK then
  begin
    writeln('Pass');
    inc(TotalPasses);
  end
else
  writeln('Fail');
 
case Mark of
  0 .. PASS_MARK -1: writeln('Fail');
  PASS_MARK .. DISTINCTION - 1: writeln('Pass');
  DISTINCTION .. 100:  writeln('Distinction');
end;  
Programming - a skill for life!

Important differences between the code of Pascal and VB console programs