Pascal

This is a discussion on Pascal within the Tech Board forums, part of the Community Boards category; I have the following program in pascal: Code: Program myprogra(input, output); Begin Read(input, c); Write(ouput, c); end. but it cannot ...

  1. #1
    Registered User
    Join Date
    Jul 2004
    Posts
    99

    Pascal

    I have the following program in pascal:
    Code:
    Program myprogra(input, output);
    Begin
    Read(input, c);
    Write(ouput, c);
    end.
    but it cannot be compiled why?
    do you know any siet with good pascal tutors or pascal forums?

  2. #2
    Registered User glUser3f's Avatar
    Join Date
    Aug 2003
    Posts
    345
    no need for input in read or output in write IIRC.
    Code:
    Program myprogram;
    Begin
    Read(c);
    Write(c);
    end.

  3. #3
    S Sang-drax's Avatar
    Join Date
    May 2002
    Location
    Göteborg, Sweden
    Posts
    2,072
    You have to declare the variable c as well:
    Code:
    Program myprogram;
    var
      c : string;
    Begin
    Read(c);
    Write(c);
    end.
    Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling

  4. #4
    Registered User
    Join Date
    Jul 2004
    Posts
    99
    Hey guys,
    is there any way so i can make the program not exit immediatly of dos when running program?

  5. #5
    Registered User
    Join Date
    Jul 2004
    Posts
    99
    help guys

  6. #6
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Read the FAQ for doing it in C, and do the same thing in Pascal perhaps? (IE: read a keystroke at the end.)

    Quzah.
    Hope is the first step on the road to disappointment.

  7. #7
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,825
    Try running it from the command line

  8. #8
    Registered User
    Join Date
    Jul 2004
    Posts
    99
    ok
    thanks

  9. #9
    Registered User
    Join Date
    Jul 2004
    Posts
    99
    do you know any site with any good tutor for pascal?

  10. #10
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,825

  11. #11
    Registered User
    Join Date
    Jul 2004
    Posts
    99
    zou thinked i haven't search?

  12. #12
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,825
    Based on your questions, I think it's pretty apparent that if you have searched, you haven't read any of the results.

  13. #13
    </life>
    Join Date
    Oct 2004
    Posts
    83
    Code:
    repeat
    writeln('Hello World');
    until KeyPressed;
    Microsoft is merely an illusion, albeit a very persistant one.

  14. #14
    Registered User
    Join Date
    Jul 2004
    Posts
    99
    hey dagdarian:
    until keypressed doesn't working!

  15. #15
    Arggggh DeepFyre's Avatar
    Join Date
    Sep 2004
    Posts
    227
    does case matter in Pascal? if so check if you are doing "KeyPressed" and not just "keypressed"
    Keyboard Not Found! Press any key to continue. . .

Page 1 of 3 123 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 6
    Last Post: 10-23-2007, 11:02 AM
  2. C & Pascal Help
    By Dragon227Slayer in forum C Programming
    Replies: 4
    Last Post: 12-01-2003, 09:40 AM
  3. Compares C++ and Pascal
    By Jaguar in forum A Brief History of Cprogramming.com
    Replies: 13
    Last Post: 07-19-2002, 12:28 PM
  4. Pascal Compiler
    By (TNT) in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 04-09-2002, 01:57 AM
  5. Pascal "with()" in C++
    By larry in forum C++ Programming
    Replies: 3
    Last Post: 09-27-2001, 03:04 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21