File: wrongforwarddefinitions.pas

package info (click to toggle)
lazarus 2.0.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 214,460 kB
  • sloc: pascal: 1,862,622; xml: 265,709; cpp: 56,595; sh: 3,008; java: 609; makefile: 535; perl: 297; sql: 222; ansic: 137
file content (45 lines) | stat: -rw-r--r-- 989 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
unit WrongForwardDefinitions; 

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils; 
  
type
  PMyInteger = ^TMyInteger;
  TMyArray = array[0..MaxNumber] of TMyInteger;

const
  MaxNumber = 3;

type
  TMyRecord = record
    i: TMyInteger;
    Next: PMyRecord;
  end;

var AnArray: array[0..EndValue] of char;
const EndValue = TMyInteger(1);

type
  TMyInteger = longint;
  PMyRecord = ^TMyRecord;
  TMyFunc = procedure(i: integer);
  MyNilFunc = TMyFunc(0);// should be changed to const
  Func2 = MyNilFunc;     // should be changed to const
  Func3 = Func2;         // should be changed to const

type
  FuncType1 = function (_para2:longint; _para3:pointer; _para4:pointer):longint;cdecl;
    MPI_NULL_DELETE_FN = MPI_Delete_function(0);// should be changed to const

  function ExternalFunc1(_para1:longint; _para2:pointer):longint;cdecl;external name 'ExternalFunc1';
const
    ExternalFuncAlias1 = ExternalFunc1;// should be replaced with full declaration

implementation

end.