Solved

I have a problem with compiling a pascal assignment

Posted on 2000-02-19
3
182 Views
Last Modified: 2010-04-04
I have a problem with compiling a pascal assignment . If anyone is interested in helping they can e-mail at hpool@pdq.net
0
Comment
Question by:Hpool_12
  • 3
3 Comments
 
LVL 17

Expert Comment

by:inthe
ID: 2538977
either paste the offending file here or send to:
BorgsAssimilate@Aol.Com and i take a look.

what are the errors etc .. ?
0
 
LVL 17

Expert Comment

by:inthe
ID: 2539102
hi,
this is actually the delphi area not pascal but i had a look and you program should look more like below:
(it compiles fine in turbo pascal 7)


PROGRAM Compute_Cost;

Uses
     Crt;
   Var  Cost, Length, Width, Total_Cost :real;

Procedure GetData ;
Begin
  Clrscr;
  Writeln ('What is the room length in feet and press Enter');
  Readln(length);
  Writeln ('What is the room width in feet and press Enter');
  Readln(width);
  Writeln ('What is the carpet price/square yard and press Enter');
  Readln(Cost);
{some arbituary calculation this above is just pseudo code example}
  total_cost := ((cost * 2.4)*(length * width));    
  Writeln(total_cost);
END;

begin
getdata;
end.

you were missing begin , end. etc ..
and had declared some paramaters for the procedure where they werent really  needed as they were already declared as global anyway.
hope its what you need
 
(note youll need to change the calculating of result)

Regards Barry
0
 
LVL 17

Accepted Solution

by:
inthe earned 100 total points
ID: 2539513
³
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now