Well, this doesn't relate to Windows programming per say, but I have a question about Pascal, and I'm going to do ask it in this forum for the lack there better of.
I'm very new to programming and I'm doing about the simplest of things, even using a simple language. I'm using this program that I'm going to show as a learning basis, so I can create a better one soon. Here is the code:
PROGRAM country_game; {a country matching game}
VAR {by Kyle Clark}
country : STRING[20];
capital : STRING[20];
answer : STRING[20];
BEGIN
WRITELN('enter the name of a country');
READLN(country);
WRITELN('enter the name of the capital');
READLN(capital);
CLRSCR;
WRITELN('What is the capital of ', country, '?');
READLN(answer);
IF answer = capital
THEN
BEGIN
WRITELN('the capital of ', country, ' is ', capital);
WRITELN('well done, you have got it correct');
READLN;
END
ELSE
BEGIN
WRITELN('sorry, you have got it correct');
WRITELN('the correct answer is ', capital);
READLN;
END
END.
Everything works fine when I snip out the line of code of " CLRSCR; ", but when I leave it in I get three errors that relate to the " CLRSCR; " line. Yes, I have read the FAQ for this board, and they haven't helped either. I would greatly appreciate it if somebody could help me out.