I have the following program in pascal:
but it cannot be compiled why?Code:Program myprogra(input, output);
Begin
Read(input, c);
Write(ouput, c);
end.
do you know any siet with good pascal tutors or pascal forums?
Printable View
I have the following program in pascal:
but it cannot be compiled why?Code:Program myprogra(input, output);
Begin
Read(input, c);
Write(ouput, c);
end.
do you know any siet with good pascal tutors or pascal forums?
no need for input in read or output in write IIRC.
Code:Program myprogram;
Begin
Read(c);
Write(c);
end.
You have to declare the variable c as well:
Code:Program myprogram;
var
c : string;
Begin
Read(c);
Write(c);
end.
Hey guys,
is there any way so i can make the program not exit immediatly of dos when running program?
help guys
Read the FAQ for doing it in C, and do the same thing in Pascal perhaps? (IE: read a keystroke at the end.)
Quzah.
Try running it from the command line
ok
thanks
do you know any site with any good tutor for pascal?
http://www.google.com/search?hl=en&q=pascal+tutorial
edit: Don't bump posts, either.
zou thinked i haven't search?
Based on your questions, I think it's pretty apparent that if you have searched, you haven't read any of the results.
Code:repeat
writeln('Hello World');
until KeyPressed;
hey dagdarian:
until keypressed doesn't working!
does case matter in Pascal? if so check if you are doing "KeyPressed" and not just "keypressed"
Nope it doesn't matter, i have read that
asd and ASD is the same
I haven't coded pascal for years but i believe keypressed is case sensitive, try KeyPressed and if that fails try keypressed.
include
uses crt;
at the top.
Hey if you mean the code hsould look like this:
cannot compile find an eero at crt!Code:Program keyp
begin
uses crt;
writeln('Hello World');
until KeyPressed;
end.
No, try this:Quote:
Originally Posted by cogeek
Code:Program keyp
uses crt;
begin
repeat
writeln('Hello World');
until KeyPressed;
end.
still cannot compile!
Quote:
Originally Posted by cogeek
is completely valid and should compile without errors, what errors are you getting?Code:Program keyp;
uses crt;
begin
repeat
writeln('Hello World');
until keypressed;
end.
shoul di add a ; at Program keyp
at the above you didn't?
hey i forgoteed add the ; that why it wasn't working but i got another problem i don't wanna it be repeated but only once?
yea. use the example above with the semi colon.
if you are still getting errors, then post your errors otherwise, there's not much people can do. im off the night, so good luck.
Look up for loops, and i suggest you read a pascal tutorial like this one
thank for tutor
Maybe if you were more careful with your spelling you'd have less problems...
In my experience people who don't take care to properly use human languages don't take care using programming languages either which leads to a lot of errors.
may be his primary language is not English..Quote:
Originally Posted by jwenting
Neither is yours, but it's rare that I have a problem figuring out what you're talking about.Quote:
Originally Posted by vasanth
Maybe he's a chronic alcoholic trying to make a living, lay off the man.
oh and apparently he's from greece.
Neither is mine but I take care to use proper English when posting on an English language site.Quote:
Originally Posted by vasanth
That's one reason I don't post on Russian or Japanese (to name a few) sites, as I don't know the languages.
Besides, all compiler docs are written in English as are most (and in my experience all worthwhile) books (even translations often loose a lot as most of them are done by professional translators who know nothing of the subject matter of the book and thus make glaring errors).
If I get complimented by native speakers regularly for my English that's only after many years of hard study (and initially very low grades). But I knew I'd need English sooner or later in my chosen career so I persevered and it paid off handsomely.
If you don't care to make that commitment to learn to communicate with people, why even think you can communicate with computers whose operating systems and programming languages were created in English?
Even Niklaus Wirth (a Frenchman or Swiss if I remember my history lessons) made Pascal using English language constructs and not his native language.
At work we have a custom language that's based on a translated C syntax into my native language. It's horrendous...
Greek's Chinese to me :DQuote:
Originally Posted by B0bDole
And that despite 3 years of ancient Greek at school (now mostly forgotten, it was 20 years ago and I never used it since).