參數傳遞問題 |
尚未結案
|
m510011
一般會員 發表:18 回覆:18 積分:7 註冊:2002-05-16 發送簡訊給我 |
各位先進,我有各問題,想請教大家,我有個程式原來在Delphi5可以編譯及執行,最近想改為Delphi7重新編譯卻出現錯誤,在傳遞參數問題,請大家幫忙
....
ct_data_ptr = ^ct_data;
ct_data = record
fc : record
case byte of
0:(freq : ush);
1:(code : ush);
end;
dl : record
case byte of
0:(dad : ush);
1:(len : ush);
end;
end; procedure compress_block(var s : deflate_state;
var ltree : array of ct_data;
var dtree : array of ct_data);
.... 在呼叫
compress_block(s, static_ltree, static_dtree);
地方 Compiler時,出現
Constant object cannot be passed as var parameter錯誤訊息,可是在Delphi5可以編譯成功,不知道期間的差異在那裡,麻煩大家,在此先謝謝各位
|
william
版主 發表:66 回覆:2535 積分:3048 註冊:2002-07-11 發送簡訊給我 |
What is the declaration for s, static_ltree and static_dtree? Try checking it: Project|Options|Compiler|Assignable typed constants I think perhaps you could better fix the code for not changing any constant? http://pywong.hk.st
|
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |