summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/webtbs/tw1374.pp
blob: a95c11586c6fc3350cb2df6fd3bca75f1b392e26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{ Source provided for Free Pascal Bug Report 1374 }
{ Submitted by "Christian Keck" on  2001-02-01 }
{ e-mail: C.Keck@gmx.net }
program realtest;

var temp        : longint;
    low         : byte;
    high        : byte;
    DLL_Version : extended{real};

begin
  temp:= 14340; { This value is normaly retrieved form an external DLL }

  low:= ((temp shr 8) and $FF);
  high:= (temp and $FF);          { Some calculation...   }
  DLL_Version:= high + (low/100); { to get an real result }

  { ... }

  if DLL_Version < 4.56 then      { 4.560000000000000E+000 < 4.56 ?!?! }
    writeln ('Error! 4.56 < 4.56');
end.