小编Bab*_*abu的帖子

多线程bubblesort.与delphi 7一起工作正常但与Lazarus不一样吗?编译错误?

首先,我想向您展示我的代码:

unit BSort;

{==============================================================================}

{$mode objfpc}{$H+}

{==============================================================================}

interface

{==============================================================================}

uses
  Classes, SysUtils;

{==============================================================================}

type
  TcompFunc = function(AValue1, AValue2 : Integer) : boolean;
  TIntegerArray = array of integer;
  PIntegerArray = ^TIntegerArray;

{==============================================================================}

procedure BubbleSort(var AMatrix : TIntegerArray; ACompFunc : TCompFunc);
function V1LargerV2(AValue1, AValue2 : Integer) : Boolean;

{==============================================================================}

implementation

{==============================================================================}

procedure Swap(var AValue1, AValue2 : Integer);
var
  Tmp : Integer;
begin
  Tmp := AValue1;
  AValue1 := AValue2;
  AValue2 := Tmp;
end;

{==============================================================================}

function V1LargerV2(AValue1, AValue2 : Integer) : Boolean;
begin
  result …
Run Code Online (Sandbox Code Playgroud)

delphi multithreading lazarus fpc

4
推荐指数
1
解决办法
663
查看次数

标签 统计

delphi ×1

fpc ×1

lazarus ×1

multithreading ×1