社区
Delphi
帖子详情
[Error] Main.pas(1042): Left side cannot be assigned to如何解决?
rbws
2003-02-23 05:14:37
procedure Form1.f(var t) //t是T的一个对象
begin
t.p := a; //p是T的一个属性,a是Form1的一个成员变量,类型
//一致,但在这里出现了如题的错误,为何?
end;
...全文
73
7
打赏
收藏
[Error] Main.pas(1042): Left side cannot be assigned to如何解决?
procedure Form1.f(var t) //t是T的一个对象 begin t.p := a; //p是T的一个属性,a是Form1的一个成员变量,类型 //一致,但在这里出现了如题的错误,为何? end;
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
7 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
sunware
2003-02-23
打赏
举报
回复
这个t.a是只读的,不能被赋值.
rbws
2003-02-23
打赏
举报
回复
To kiss2:
不会吧,都搞成局部变量了,当然不会有编译错误
那就没用了
kiss2
2003-02-23
打赏
举报
回复
必须这样:
procedure Form1.f;
var t:T
begin
new(t);
t.p := a;
end;
rbws
2003-02-23
打赏
举报
回复
不好意思,f(var t: T)当然是有的了,当然为了简单没写
ly_liuyang
2003-02-23
打赏
举报
回复
procedure Form1.f(var t) ?
这就有问题了,var t是无类型变量!
必须是var t:MyRecord等的表达或TMyObject的
outer2000
2003-02-23
打赏
举报
回复
var t
outer2000
2003-02-23
打赏
举报
回复
类型//一致???
Delphi XE E2064
Left
s
ide
cannot be
assign
ed
to 错误
解决
方法
Delphi XE E2064
Left
s
ide
cannot be
assign
ed
to 错误
解决
方法 1. 起源 此问题源于[秋风人事档案管理系统]用Delphi XE重编译中所发现。 快十年了,当初Delphi 7所编写项目,想用Delphi XE重新编译,并打算做为...
VSCode中的用户自定义配置文件settings.json和默认配置defaultSettings.json
// Controls whether suggestions should be accept
ed
on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions. // - on // - smart: Only accept a...
vscode 默认setting.json配置
// Controls whether the diff
ed
itor shows the diff s
ide
by s
ide
or inline. "diff
Ed
itor.renderS
ide
ByS
ide
": true, // Controls whether suggestions should be accept
ed
on commit characters. For example...
ANSI C
//有多少人会读完它? 1.three section: environment,language,library 2.bit byte object character argument formal-argument(parma...3.prototype of function:int
main
(void) or catch arguments (int
main
(int ar
Oracle VM VirtualBox R ? Programming Gu
ide
and Reference
2.3.6 C binding to VirtualBox API . . . . . . . . . . . . . . . . . . . . . . . . 39 3 Basic VirtualBox concepts; some examples 47 3.1 Obtaining basic machine information. Reading attributes . . . . ....
Delphi
5,386
社区成员
262,729
社区内容
发帖
与我相关
我的任务
Delphi
Delphi 开发及应用
复制链接
扫一扫
分享
社区描述
Delphi 开发及应用
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章