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

« back to all changes in this revision

Viewing changes to fpcsrc/tests/tbs/tb0251.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
{ Old file: tbs0291.pp }
 
2
{ @procvar in tp mode bugss                             OK 0.99.13 (PFV) }
 
3
 
 
4
{$ifdef fpc}{$mode tp}{$endif}
 
5
 
 
6
function ReturnString: string;
 
7
begin
 
8
  ReturnString := 'A string';
 
9
end;
 
10
 
 
11
procedure AcceptString(S: string);
 
12
begin
 
13
  WriteLn('Got: ', S);
 
14
  if S<>'A string' then
 
15
   begin
 
16
     writeln('ERROR!');
 
17
     halt(1);
 
18
   end;
 
19
end;
 
20
 
 
21
type
 
22
  TStringFunc = function: string;
 
23
 
 
24
const
 
25
  SF: TStringFunc = ReturnString;
 
26
var
 
27
  S2: TStringFunc;
 
28
begin
 
29
  @S2:=@ReturnString;
 
30
  AcceptString(ReturnString);
 
31
  AcceptString(SF);
 
32
  AcceptString(S2);
 
33
end.