Search Results

Showing results 1 to 4 of 4
Search took 0.00 seconds.
Search: Posts Made By: Sub Xero ; Forum: Pascal and Delphi and child forums
Forum: Pascal and Delphi Jul 6th, 2009
Replies: 6
Views: 456
Posted By Sub Xero
I like this line:

WriteLn('The balance is: ',balance:0:0);

Very neat.

Sub Xero
Forum: Pascal and Delphi Jul 5th, 2009
Replies: 5
Views: 699
Posted By Sub Xero
It should be exactly the same. Format returns a string, so there's no difference in applying the result to an Editbox or a label.
What exactly is the problem?

Sub Xero
Forum: Pascal and Delphi Jul 5th, 2009
Replies: 5
Views: 699
Posted By Sub Xero
Use the Format command like this:

VolumeCalc.Caption := Format('%.2f',[StrToFloat(EngineSizeVal.Text) / 2 / StrToFloat(CylNumVal.Text)]);


Sub Xero
Forum: Pascal and Delphi Jul 5th, 2009
Replies: 6
Views: 456
Posted By Sub Xero
Your main problem is 'balance' should be a real type, as multiplying it by 1.03 will return a non integer value. Here's how I'd do it:


program Project1;

{$APPTYPE CONSOLE}

uses
SysUtils;
Showing results 1 to 4 of 4

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC