~ubuntu-branches/debian/lenny/fpc/lenny

« back to all changes in this revision

Viewing changes to fpcsrc/tests/webtbs/tw1133.pp

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-05-17 17:12:11 UTC
  • mfrom: (3.1.9 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080517171211-9qi33xhd9evfa0kg
Tags: 2.2.0-dfsg1-9
[ Torsten Werner ]
* Add Mazen Neifer to Uploaders field.

[ Mazen Neifer ]
* Moved FPC sources into a version dependent directory from /usr/share/fpcsrc
  to /usr/share/fpcsrc/${FPCVERSION}. This allow installing more than on FPC
  release.
* Fixed far call issue in compiler preventing building huge binearies.
  (closes: #477743)
* Updated building dependencies, recomennded and suggested packages.
* Moved fppkg to fp-utils as it is just a helper tool and is not required by
  compiler.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
{$mode objfpc}
 
2
type
 
3
   float = double;
 
4
 
 
5
 
 
6
function ConvertRealToPixel(Axis     : integer;
 
7
                            HelpReal : real) : real;
 
8
 
 
9
   begin   { function ConvertRealToPixel }
 
10
      ConvertRealToPixel := HelpReal;
 
11
   end;    { function ConvertRealToPixel }
 
12
 
 
13
 
 
14
var
 
15
   HelpFloat1,HelpFloat2,HelpFloat3  : float;
 
16
   SegmentStartPos        : float;
 
17
   SegmentLength          : float;
 
18
 
 
19
 
 
20
begin
 
21
   SegmentStartPos := 0.5;
 
22
   SegmentLength := 0.5;
 
23
   HelpFloat1 := SegmentStartPos - SegmentLength / 2;
 
24
   HelpFloat2 := ConvertRealToPixel(1,HelpFloat1);
 
25
   writeln('Function result = ',HelpFloat2,'  This is OK');
 
26
 
 
27
   HelpFloat3 := ConvertRealToPixel(1,SegmentStartPos - SegmentLength / 2);
 
28
   writeln('Function result = ',HelpFloat3,'  THIS IS WRONG !');
 
29
   if HelpFloat2<>HelpFloat3 then
 
30
    begin
 
31
      Writeln('ERROR!');
 
32
      Halt(1);
 
33
    end;
 
34
end.