【Delphi互換!?】FreePascal/Lazarus その2【GPL】 (979レス)
前次1-
抽出解除 必死チェッカー(本家) (べ) 自ID レス栞 あぼーん

リロード規制です。10分ほどで解除するので、他のブラウザへ避難してください。
897: 2021/03/09(火)15:37 ID:l78vZ82J(1)調 AAS
windows10 で lazarus 2.0.12 を利用していますが、以下のようなコードの2か所で修飾子エラーになります
{MODE Delphi} なら大丈夫なのですが {$mode objfpc} の場合、どのように変更すればよろしいのでしょうか

type
PPHashItem = ^PHashItem;
PHashItem = ^THashItem;
THashItem = record
Next: PHashItem;
Key: string;
Value: Integer;
end;
TStringHash = class
private
Buckets: array of PHashItem;
protected
function Find(const Key: string): PPHashItem;
end;

function TStringHash.Find(const Key: string): PPHashItem;
var
Hash: Integer;
begin
Hash := HashOf(Key) mod Cardinal(Length(Buckets));
Result := @Buckets[Hash];
while Result^ <> nil do
begin
if Result^.Key = Key then <--- この部分が修飾子エラー
Exit
else
Result := @Result^.Next; <--- この部分も修飾子エラー
end;
end;
前次1-
スレ情報 赤レス抽出 画像レス抽出 歴の未読スレ AAサムネイル

ぬこの手 ぬこTOP 0.027s