Guest:
Register
|
Login
|
Member List
|
Search
|
Statistics
|
FAQ
Language
----------
Simplifed Chinese
Traditional Chinese
English
CnPack Forum
»
CnPack IDE 专家包(CnWizards)
» 一个小错误
‹‹ Last Thread
|
Next Thread ››
Poll
Trade
Reward
Activity
Printable Version
|
Email to Friend
|
Subscription
|
Favorites
Subject: 一个小错误
Redbreast
灌水科科长
UID 679
Digest Posts 0
Credits 151
Posts 58
点点分 151
Reading Access 10
Registered 2005-2-2
Status Offline
#1
Post at 2008-10-20 14:12
Profile
|
Blog
|
P.M.
一个小错误
代码提示的一个小问题,环境:
d2007,
CnWizards_0.8.9.452_Preview.exe
会丢掉一个3字,奇怪哦,经验证是吃掉了第一个字符,里面为空的时候会吃掉第一个]
[
本帖最后由 Redbreast 于 2008-10-20 14:17 编辑
]
Image Attachment
:
未命名-2.jpg
(2008-10-20 14:12, 17.34 K)
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-10-20 15:58
Profile
|
Blog
|
P.M.
请问IDE是什么版本?
看起来好像是前面的字符串里头那个双字节字符引起的位置计算错误的问题。
Redbreast
灌水科科长
UID 679
Digest Posts 0
Credits 151
Posts 58
点点分 151
Reading Access 10
Registered 2005-2-2
Status Offline
#3
Post at 2008-10-21 08:44
Profile
|
Blog
|
P.M.
11.0.2902.10471
Redbreast
灌水科科长
UID 679
Digest Posts 0
Credits 151
Posts 58
点点分 151
Reading Access 10
Registered 2005-2-2
Status Offline
#4
Post at 2008-10-23 10:47
Profile
|
Blog
|
P.M.
454版本已经解决了这个问题
Passion
(LiuXiao)
管理员
UID 359
Digest Posts
19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
#5
Post at 2008-10-23 12:11
Profile
|
Blog
|
P.M.
请问您测试的时候前面是否仍然用的还是那个双字节字符?
Redbreast
灌水科科长
UID 679
Digest Posts 0
Credits 151
Posts 58
点点分 151
Reading Access 10
Registered 2005-2-2
Status Offline
#6
Post at 2008-10-24 16:16
Profile
|
Blog
|
P.M.
是滴,但是452和其前一个版本都有此问题,我还以为呢你们修改好的,难道没修改就好了?!
[
本帖最后由 Redbreast 于 2008-10-24 16:18 编辑
]
Redbreast
灌水科科长
UID 679
Digest Posts 0
Credits 151
Posts 58
点点分 151
Reading Access 10
Registered 2005-2-2
Status Offline
#7
Post at 2008-10-24 16:22
Profile
|
Blog
|
P.M.
错了,还是没有好,测试的是的([])没问题,[[]]还是不对,后面的表现和前面的还不一样,呵呵,这样用的时候很晕,这些代码我都是卸载了cnwizad以后写的,否则就晕死了:)
s1 := Format('%.2d°',[DataRec[38]])+Format('%.2d′',[DataRec[39]])+Format('%.2d',[DataRec[40]])+Format('%.2d',[DataRec[41]]);
还是丢
[
本帖最后由 Redbreast 于 2008-10-24 16:28 编辑
]
Passion
(LiuXiao)
管理员
UID 359
Digest Posts
19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
#8
Post at 2008-10-24 17:23
Profile
|
Blog
|
P.M.
唉是啊。问题就在于部分双字节字符在编辑器内只占一个字符位置,而我们都是以汉字占两个字节的方式来处理的,因此导致了错位。
即使能顺利区分占一个字节的双字节字符和占两个字节的双字节字符,还得考虑效率问题。
Redbreast
灌水科科长
UID 679
Digest Posts 0
Credits 151
Posts 58
点点分 151
Reading Access 10
Registered 2005-2-2
Status Offline
#9
Post at 2008-11-1 11:22
Profile
|
Blog
|
P.M.
奇怪了,今天早上装了456最新版,对下面的代码,前两行有问题,后两行没问题,不知是啥原因啊
s1 := Format('%.2d°',[DataRec[38]])
+Format('%.2d′',[DataRec[39]])
+Format('%.2d',[DataRec[40]])
+Format('%.2d',[DataRec[41]]);
Passion
(LiuXiao)
管理员
UID 359
Digest Posts
19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
#10
Post at 2008-11-1 12:08
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-23 09:47
Powered by
Discuz!
5.0.0
© 2001-2006
Comsenz Inc.
Processed in 0.008606 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