~ubuntu-branches/ubuntu/lucid/fpc/lucid-proposed

« back to all changes in this revision

Viewing changes to fpcsrc/tests/test/cg/variants/ivarol99.pp

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-10-09 23:29:00 UTC
  • mfrom: (4.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20081009232900-553f61m37jkp6upv
Tags: 2.2.2-4
[ Torsten Werner ]
* Update ABI version in fpc-depends automatically.
* Remove empty directories from binary package fpc-source.

[ Mazen Neifer ]
* Removed leading path when calling update-alternatives to remove a Linitian
  error.
* Fixed clean target.
* Improved description of packages. (Closes: #498882)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
{$ifndef bigfile}
 
2
{$ifdef fpc}
 
3
{$mode delphi}
 
4
{$else fpc}
 
5
{$define FPC_HAS_TYPE_EXTENDED}
 
6
{$endif fpc}
 
7
{$endif bigfile}
 
8
 
 
9
type 
 
10
{$ifdef FPC_COMP_IS_INT64}
 
11
  comp99 = double;
 
12
{$else FPC_COMP_IS_INT64}
 
13
  comp99 = comp;
 
14
{$endif FPC_COMP_IS_INT64}
 
15
procedure test99(a: word); overload;
 
16
  begin
 
17
    writeln('word called instead of single');
 
18
  end;
 
19
 
 
20
procedure test99(a: single); overload;
 
21
  begin
 
22
    writeln('single called instead of word');
 
23
    halt(1)
 
24
  end;
 
25
 
 
26
var
 
27
  x99: word;
 
28
 
 
29
  y99: single;
 
30
procedure dotest99;
 
31
var
 
32
  v: variant;
 
33
 
 
34
begin
 
35
  try
 
36
    v := x99;
 
37
    test99(v);
 
38
  except
 
39
    on E : TObject do
 
40
      halt(1);
 
41
  end;
 
42
 
 
43
  try
 
44
    v := y99;
 
45
    test99(v);
 
46
  except
 
47
    on E : TObject do
 
48
      halt(1);
 
49
  end;
 
50
end;
 
51
 
 
52
{$ifndef bigfile} begin
 
53
  dotest99;
 
54
end. {$endif not bigfile}