RSS Forums RSS
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 2452 | Replies: 2 | Thread Tools  Display Modes
Reply
Join Date: Sep 2005
Posts: 2
Reputation: gisler is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
gisler gisler is offline Offline
Newbie Poster

pascal write problem

  #1  
Sep 10th, 2005
i just started a pascal programming class. so what i am trying to do is write a program that will allow me to change my weight (in stones) to kilograms and change my hight (in inches) to kilograms. i also need to be able to enter my name in. i have everything done perfect from what i can tell. but i keep getting this error that sais "expected but identifier write found" on line 9 colum 2.i'v been working on this through out the day but with no luck, what so ever. i did read your rules on the homework help policy so if you can't tell me what is wrong with the program then could you at least tell me what that error code means. thanks in advance

Var name: real;
weight1: real;
hight1: real;
sum1: real;
sum2: real;
Begin
write('Enter your name:');
readln(name);
write('Enter your weight in stones:');
readln(weight1);
write('Enter your hight in inches:');
readln(hight1)
sum1 :=weight1 * 6.63 ;
sum2 :=hight1 * 2.54;
Writeln('Your name is',name);
writeln('Your weight in kilograms is',weight2:2:2);
writeln('and your hight in inches is',hight2:2:2);
Readln;
End.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Apr 2004
Location: in a galaxy far far away :)
Posts: 121
Reputation: johnroach1985 is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 0
johnroach1985's Avatar
johnroach1985 johnroach1985 is offline Offline
Junior Poster

Re: pascal write problem

  #2  
Sep 13th, 2005
first error i see is that to readln a name you should use a char array.And you should not forget that real is for numbers ...And at the very top you should write
Program project1 (Input,Output); teling the pc you have inputs and outputs....And I thınk you should writeln instead of write....himmm thats all i see for now i don't have my compiler next to me now but i think this will work.Please inform me of the result....
------

"A rational anachist believes that concepts such as 'state' and 'society' and 'government' have no existence save as physically exemplified in acts of self-responsible individuals.He believese that it is impossible to shift blame,share blame,distrubute blame.... as blame,guilt,responsibility are matters taking place inside human beings singly and nowhere else.But being rational,he knows that not all individuals hold his evaluations,so he tries to live perfectly in an imperfectworld...aware that his effort wil be less than perfect yet undismayed by self-knowledge of self-failure."

-Robert A. Heinlein

-----
John Roach
Reply With Quote  
Join Date: Sep 2005
Posts: 2
Reputation: gisler is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
gisler gisler is offline Offline
Newbie Poster

Re: pascal write problem

  #3  
Sep 13th, 2005
yep thanks for the help. i managed to get by myself though. thanks for the help though. :lol:
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.



Similar Threads
Other Threads in the ASP.NET Forum
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 4:58 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC