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

« back to all changes in this revision

Viewing changes to fpcsrc/tests/test/cg/variants/tvarol55.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
{$ifdef fpc}
 
2
{$mode delphi}
 
3
{$endif fpc}
 
4
 
 
5
{$ifdef FPC_COMP_IS_INT64}
 
6
type 
 
7
  comp = double;
 
8
{$endif FPC_COMP_IS_INT64}
 
9
procedure test(a: currency); overload;
 
10
  begin
 
11
    writeln('currency called instead of smallint');
 
12
    halt(1)
 
13
  end;
 
14
 
 
15
procedure test(a: smallint); overload;
 
16
  begin
 
17
    writeln('smallint called instead of currency');
 
18
    writeln('YYY')
 
19
  end;
 
20
 
 
21
var
 
22
  v: variant;
 
23
  x: currency;
 
24
  y: smallint;
 
25
 
 
26
begin
 
27
  try
 
28
    v := x;
 
29
    test(v);
 
30
  except
 
31
    on E : TObject do
 
32
      halt(1);
 
33
  end;
 
34
 
 
35
  try
 
36
    v := y;
 
37
    test(v);
 
38
  except
 
39
    on E : TObject do
 
40
      halt(1);
 
41
  end;
 
42
end.