[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 201
  • Last Modified:

I have a problem with compiling a pascal assignment

I have a problem with compiling a pascal assignment . If anyone is interested in helping they can e-mail at hpool@pdq.net
0
Hpool_12
Asked:
Hpool_12
  • 3
1 Solution
 
intheCommented:
either paste the offending file here or send to:
BorgsAssimilate@Aol.Com and i take a look.

what are the errors etc .. ?
0
 
intheCommented:
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
 
intheCommented:
³
0

Featured Post

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now