Guest:
Register
|
Login
|
Member List
|
Search
|
Statistics
|
FAQ
Language
----------
Simplifed Chinese
Traditional Chinese
English
CnPack Forum
»
CnVCL 组件包
» CnStrDiff的问题
‹‹ Last Thread
|
Next Thread ››
Poll
Trade
Reward
Activity
Printable Version
|
Email to Friend
|
Subscription
|
Favorites
Subject: CnStrDiff的问题
yookee
新警察
UID 67667
Digest Posts 0
Credits 6
Posts 2
点点分 6
Reading Access 10
Registered 2012-9-18
Status Offline
#1
Post at 2012-9-18 00:16
Profile
|
Blog
|
P.M.
CnStrDiff的问题
XE2 update4下
项目引用CnStrDiff.pas,
执行到下面语句的时候会出错,提示访问冲突。
diagVecF[0] := x1;
对ascii字符串没问题,会不会是下面的语句在操作多字节字符串的时候有问题?
PChar(diagVecF) := PChar(IntArr_f) - SizeOf(Integer) * (MAX_DIAGONAL - MaxD);
从csdn上下了一个包,包里有别人编译好的一个程序,运行比较中文字符串没问题,但是包里的源代码在我这里运行也有这个问题。
包里的CnStrDiff.pas是早期版本,但是和现有CnVCL里的基本没啥改动。
[
本帖最后由 yookee 于 2012-9-18 09:49 编辑
]
Passion
(LiuXiao)
管理员
UID 359
Digest Posts
19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
#2
Post at 2012-9-18 11:48
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
#3
Post at 2012-9-20 13:44
Profile
|
Blog
|
P.M.
此现象可能是未处理高版本Delphi的Unicode问题导致的,Unicode版的Delphi里,Char是2字节,PChar的行为发生了变化。
楼主可以试着把PChar全都改成PAnsiChar试一试?
yookee
新警察
UID 67667
Digest Posts 0
Credits 6
Posts 2
点点分 6
Reading Access 10
Registered 2012-9-18
Status Offline
#4
Post at 2012-9-20 16:41
Profile
|
Blog
|
P.M.
回复 #3 Passion 的帖子
OK,好了
Passion
(LiuXiao)
管理员
UID 359
Digest Posts
19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
#5
Post at 2012-9-20 21:07
Profile
|
Blog
|
P.M.
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-22 01:20
Powered by
Discuz!
5.0.0
© 2001-2006
Comsenz Inc.
Processed in 0.007477 second(s), 7 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