User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Pascal and Delphi section within the Software Development category of DaniWeb, a massive community of 402,755 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,529 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Pascal and Delphi advertiser: Programming Forums
Views: 3180 | Replies: 1
Reply
Join Date: Apr 2005
Posts: 10
Reputation: peachy is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
peachy peachy is offline Offline
Newbie Poster

Help Delphi Pascal Error

  #1  
May 12th, 2005
I am trying to complete an assignment and i am stuck with the same error 3 times.
[Error] Project1.dpr(38): E2015 Operator not applicable to this operand type

This is my segment of code:

FUNCTION convert (hours:real; minutes:real) : real;
BEGIN
IF minutes MOD 60.0 <> 0.0 THEN
hours := (minutes + 60) div 60
ELSE
hours := minutes div 60;
END;

The error happens in the IF, Else and hours line... I can't see if , or understand why,.. any ideas?
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Apr 2005
Posts: 10
Reputation: peachy is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
peachy peachy is offline Offline
Newbie Poster

Re: Delphi Pascal Error

  #2  
May 12th, 2005
DUHHH!!! Mod ony works with Integers!!

all better.. now onto the next errors!
Reply With Quote  
Reply

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

DaniWeb Pascal and Delphi Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Pascal and Delphi Forum

All times are GMT -4. The time now is 8:29 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC