Guest:
Register
|
Login
|
Member List
|
Search
|
Statistics
|
FAQ
Language
----------
Simplifed Chinese
Traditional Chinese
English
CnPack Forum
»
技术板块灌水区
» 关于记录中.互相引用的问题
‹‹ Last Thread
|
Next Thread ››
Poll
Trade
Reward
Activity
Printable Version
|
Email to Friend
|
Subscription
|
Favorites
Subject: 关于记录中.互相引用的问题
jxydhzw
普通灌水员
UID 3904
Digest Posts
1
Credits 64
Posts 19
点点分 64
Reading Access 10
Registered 2006-12-26
Status Offline
#1
Post at 2008-6-19 10:46
Profile
|
Blog
|
P.M.
关于记录中.互相引用的问题
我写了一个记录A,和一个B.A是B的成员,同时A又有可能是B的成员.郁闷中..不知道如何写..如果普通的写法.会编译时会报Circular unit reference to 错误
请高人指 点
例如:
Type
A = record
ValueA:string;
ValueB:string;
NameList:B;
end;
type
B = record
NameA:string;
NameB:string;
ValuesList:A
end;
有点晕..不知道如何写好?
Passion
(LiuXiao)
管理员
UID 359
Digest Posts
19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
#2
Post at 2008-6-19 11:00
Profile
|
Blog
|
P.M.
如果是class,可以前向声明,如TA = class;
后面再写TA的具体声明。
但记录估计就不行了。
jxydhzw
普通灌水员
UID 3904
Digest Posts
1
Credits 64
Posts 19
点点分 64
Reading Access 10
Registered 2006-12-26
Status Offline
#3
Post at 2008-6-19 11:04
Profile
|
Blog
|
P.M.
谢谢...汗.........
Passion
(LiuXiao)
管理员
UID 359
Digest Posts
19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
#4
Post at 2008-6-19 11:17
Profile
|
Blog
|
P.M.
毕竟一个class的引用尺寸大小是能定的,但一个record则不能定。
可以考虑改用指针。
Poll
Trade
Reward
Activity
CnPack Forum
CnPack English Forum
> CnWizards IDE Wizards
> CVSTracNT
> Announcements & Others
All times are GMT++8, the time now is 2024-11-24 00:02
Powered by
Discuz!
5.0.0
© 2001-2006
Comsenz Inc.
Processed in 0.011761 second(s), 9 queries , Gzip enabled
TOP
Clear Cookies
-
Contact Us
-
CnPack Website
-
Archiver
-
WAP
Member's CP Home
Edit Profile
Credits Transaction
Public User Groups
Buddy List
Main
Page Views
User Agents
Posts History
Top Forums
Top Threads
Post Ranking
Credit Ranking
Online Time
Team
Moderation Stats