if (i >= 1) and (i<= 7) then
begin
if sw= 'Full' then
writeln('The day in words is: ' + tmpStr)
else
writeln('The day in words is: ' + leftStr(tmpStr,3));
end;
end;
The above code is from the book, part of a program
On the first 'writeln' there is no semicolon.
But the second 'writeln' has one, why not the first also.
I have tried no semicolons and the code does not produce an error and the program works.
I have also tried a semicolon on both statements and the code does not compile.
All previous 'writeln' statements in the book ended with a semicolon.
What makes this different?
Thanks,