Thread: A Simple Question

  1. #1
    Unregistered
    Guest

    A Simple Question

    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.

  2. #2
    Registered User
    Join Date
    Sep 2001
    Posts
    412
    Umm... it's not in the FAQ because this is not a board to discuss Pascal. I'm sure searching for a board that actually deals with the language you're programming in would benefit you, because I'm not sure how many people here, if any, program in Pascal.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Simple question regarding variables
    By Flakster in forum C++ Programming
    Replies: 10
    Last Post: 05-18-2005, 08:10 PM
  2. Simple class question
    By 99atlantic in forum C++ Programming
    Replies: 6
    Last Post: 04-20-2005, 11:41 PM
  3. Simple question about pausing program
    By Noid in forum C Programming
    Replies: 14
    Last Post: 04-02-2005, 09:46 AM
  4. simple question.
    By InvariantLoop in forum Windows Programming
    Replies: 4
    Last Post: 01-31-2005, 12:15 PM
  5. simple fgets question
    By theweirdo in forum C Programming
    Replies: 7
    Last Post: 01-27-2002, 06:58 PM