Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

I have a problem with compiling a pascal assignment

Posted on 2000-02-19
3
Medium Priority
?
195 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 400 total points
ID: 2539513
³
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
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…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

730 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