1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Help with Pascal needed!

Discussion in 'Software Development' started by TheBarefoot, Jul 9, 2012.

Thread Status:
Not open for further replies.
Advertisement
  1. TheBarefoot

    TheBarefoot Thread Starter

    Joined:
    Jul 9, 2012
    Messages:
    3
    Helo I need a little help , I've downloaded FPC and I tried to write a program in it (the program is from my teacher so i think it must be right) and when I tried to compile it , the 2 errors had occurred:
    first .pas (4,6) Fatal : Syntax error ":" expected but ";" found
    I don't uderstand this error cause I've been taught that after a line , there comes " ;"
    and then the other error:
    first .pas (0) Fatal : Compilation aborted
    this might be caused by the firts error or?
    Here's the program that I've written:
    program first;
    uses crt;
    var A, B, volume: integer;
    begin;
    clrscr;
    write ('type side A');
    readln (A);
    write ('type side B');
    readln (B);
    volume:= A*B;
    write ('volume is:', volume);
    readln;
    end.
     
  2. Sponsor

  3. NuttyBar

    NuttyBar Banned

    Joined:
    Jun 29, 2012
    Messages:
    67
    Take away the semicolon after "begin".
     
  4. TheBarefoot

    TheBarefoot Thread Starter

    Joined:
    Jul 9, 2012
    Messages:
    3
    Thank you, I never thought that semicolon may cause this problem. I'm such a noob :D
     
  5. NuttyBar

    NuttyBar Banned

    Joined:
    Jun 29, 2012
    Messages:
    67
    Hah. :)

    I don't even/have never used Pascal, but I just figured that was wrong by researching Pascal syntax. :cool:
     
  6. Squashman

    Squashman Trusted Advisor

    Joined:
    Apr 4, 2003
    Messages:
    19,753
    I hadn't programmed pascal since the early 90's in college and I couldn't remember if it needed it or not.
    So all I did was Google search for "Pascal Hello World" to see a program example. Most problems can be solved if people would just use some common sense and search the Internet.
    We didn't quite have the Internet at my college from 1989 to 1993 but we had Books, Teachers and Other Students to reference all the time.

    For the original poster, don't expect us to do your home work for you the rest of the year.
     
  7. ckphilli

    ckphilli

    Joined:
    Apr 29, 2006
    Messages:
    4,393
    (y)
     
  8. TheBarefoot

    TheBarefoot Thread Starter

    Joined:
    Jul 9, 2012
    Messages:
    3
    No be sure that I'm not expecting you to do this. and it's not my homework. It's just a program that my teacher gave me to exercise. I just never thought that a semicolon may have cause such a problem. Now we're having a holiday so I don't have a teacher to ask and we don't have books to learn from so sorry for wasting your precious time. Have a nice day.
     
  9. NuttyBar

    NuttyBar Banned

    Joined:
    Jun 29, 2012
    Messages:
    67
    In programming, a 60,000 line mega-program/game engine and game source code can fail to run because of a semicolon.

    One error in programming is enough to wreck the whole program.

    But yeah, of course your error is forgiven. Everyone makes mistakes.

    But it is something to note that a lot of things(a LOT)can be found through other information on the internet.

    Most of the time a lot of questions programmers have can probably be discovered easier and faster by searching online than by posting questions.

    But again, it's not your fault.
     
  10. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1060274