corsasport.co.uk
 

Corsa Sport » Message Board » General Chat » Delphi - Errors


New Topic

New Poll
  Subscribe | Add to Favourites

You are not logged in and may not post or reply to messages. Please log in or create a new account or mail us about fixing an existing one - register@corsasport.co.uk

There are also many more features available when you are logged in such as private messages, buddy list, location services, post search and more.


Author Delphi - Errors
Jamie
Member

Registered: 1st Apr 02
Location: Aberdeen
User status: Offline
15th Sep 04 at 13:38   View User's Profile U2U Member Reply With Quote

program WrkSh4Q1;
VAR oldsalary,newsalary,monthlysal,weeklysal:real;

PROCEDURE Getoldsalary;
begin
writeln('Please enter previous annual salary')
readln(oldsalary);

writeln;
end;

PROCEDURE Getnewsalary;
begin
newsalary:=oldsalary+(oldsalary * 0.099)

writeln;
end;

PROCEDURE Getmonthlysal;
begin
monthlysal:=newsalary/12

writeln;
end;

PROCEDURE Getweeklysal;
begin
weeklysal:=newsalary/52

writeln;
end;

{$APPTYPE CONSOLE}

begin
{ TODO -oUser -cConsole Main : Insert code here }
Getoldsalary;
Getnewsalary;
Getmonthlysal;
Getweeklysal;
writeln(newsalary:3:2);
writeln(monthlysal:3:2);
writeln(weeklysal:3:2);
readln;
end.
Jamie
Member

Registered: 1st Apr 02
Location: Aberdeen
User status: Offline
15th Sep 04 at 13:39   View User's Profile U2U Member Reply With Quote

Errors on
7
16
23
30

PaulW
Member

Registered: 26th Jan 03
Location: Atherton, Greater Manchester
User status: Offline
15th Sep 04 at 14:47   View User's Profile U2U Member Reply With Quote

your not trailing all the lines with a semi colon...

only the End. and Begin statements dont have one

Also, your in Delphi.. you can't use the WRITELN statement unless your coding a console app... If its a regular windows program, you either paint the text (hard) or just add labels to the form & change the value (easy)
Jamie
Member

Registered: 1st Apr 02
Location: Aberdeen
User status: Offline
15th Sep 04 at 15:08   View User's Profile U2U Member Reply With Quote

Using Console Application

Forgot to use ; after newsalary, weeklysal, mothly etc

cheers mate
PaulW
Member

Registered: 26th Jan 03
Location: Atherton, Greater Manchester
User status: Offline
15th Sep 04 at 15:37   View User's Profile U2U Member Reply With Quote


 
New Topic

New Poll

Corsa Sport » Message Board » General Chat » Delphi - Errors 23 database queries in 0.0126319 seconds