DELPHI盒子
!实时搜索: 盒子论坛 | 注册用户 | 修改信息 | 退出
检举帖 | 全文检索 | 关闭广告 | 捐赠
技术论坛
 用户名
 密  码
自动登陆(30天有效)
忘了密码
≡技术区≡
DELPHI技术
lazarus/fpc/Free Pascal
移动应用开发
Web应用开发
数据库专区
报表专区
网络通讯
开源项目
论坛精华贴
≡发布区≡
发布代码
发布控件
文档资料
经典工具
≡事务区≡
网站意见
盒子之家
招聘应聘
信息交换
论坛信息
最新加入: jeff1314
今日帖子: 19
在线用户: 12
导航: 论坛 -> DELPHI技术 斑竹:liumazi,sephil  
作者:
男 pch (走刀口) ★☆☆☆☆ -
盒子活跃会员
2004/1/19 17:56:54
标题:
谁能告诉我这是为什么啊?回帖发钱! 浏览:1652
加入我的收藏
楼主: unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  Menus;

type
    mapdata=record
    mapindex:array[1..7500] of integer;
    maparouse:array[1..7500] of string;
    unitwidth,unitheight:array [1..7500] of integer;
    mapxindex,mapyindex:integer;
    spwidth,spheight:integer;
    end;

    TForm1 = class(TForm)
    MainMenu1: TMainMenu;
    N1: TMenuItem;
    N2: TMenuItem;
    N3: TMenuItem;
    N4: TMenuItem;
    procedure N3Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.N3Click(Sender: TObject);
var
mapfile :file of mapdata;
begin

end;

end.


为什么每次运行到
var
mapfile :file of mapdata;
就回出现
type 'mapdata' needs finalization - not allowed in file type
错误

谁能告诉我啊 啊啊啊啊啊啊啊啊啊啊啊


----------------------------------------------
漏洞,漏洞,我的爱!
作者:
男 pch (走刀口) ★☆☆☆☆ -
盒子活跃会员
2004/1/19 17:59:37
1楼: ¥      ¥
  ¥¥¥
    ¥
    ¥
  ¥
  ¥
----------------------------------------------
漏洞,漏洞,我的爱!
作者:
男 shaoyy (远洋) ★☆☆☆☆ -
盒子活跃会员
2004/1/19 17:59:48
1楼: 文件类型的变量不允许定义成局部变量,你可以将
var
mapfile :file of mapdata;
放在implementation下:

implementation
var
mapfile :file of mapdata;

或定义成类域。

----------------------------------------------
www.acreport.com
作者:
男 pch (走刀口) ★☆☆☆☆ -
盒子活跃会员
2004/1/19 18:00:57
2楼: 哈哈哈哈哈哈
谢谢
谢谢
谢谢

这个问题一直困饶着我
----------------------------------------------
漏洞,漏洞,我的爱!
作者:
男 pch (走刀口) ★☆☆☆☆ -
盒子活跃会员
2004/1/19 18:04:47
3楼: 不行不行
还是会出错啊
----------------------------------------------
漏洞,漏洞,我的爱!
作者:
男 jjaw100 (jj) ★☆☆☆☆ -
盒子活跃会员
2004/1/19 23:39:40
4楼: procedure TForm1.N3Click(Sender: TObject);
implementation

uses
 

// hidden global variable
var
 mapfile :file of mapdata;

// all the exported functions must be coded
procedure MyProc;
begin
  // ... code of procedure TForm1.N3Click(Sender: TObject);
end;

initialization
  // optional initialization part

finalization
  // optional clean-up code


----------------------------------------------
-
信息
登陆以后才能回复
Copyright © 2CCC.Com 盒子论坛 v3.0.1 版权所有 页面执行66.40625毫秒 RSS