Var
RecordString:TStringList;
I:Integer;
Begin
RecordString:=TStringList.Create;
RecordString.AddObject('MyDate',Pointer(StrtoInt('123')),
I:=LongInt(RecordString.Objects[0]);
最后I的到值喂123。
这就可以达到存储'123'的目的。但如果是'NB'这类无法用StrToInt转化的非数字数据呢?
RecordString:TStringList;
I:Integer;
Begin
RecordString:=TStringList.Create;
RecordString.AddObject('MyDate',Pointer(StrtoInt('123')),
I:=LongInt(RecordString.Objects[0]);
最后I的到值喂123。
这就可以达到存储'123'的目的。但如果是'NB'这类无法用StrToInt转化的非数字数据呢?
解决方案 »
- 不想用ListView中带的表头,想用THeaderControl控件代替,如何和ListView绑定?
- 恭喜哈欠生产出哈欠V2.0
- http://blog.csdn.net/ZengMuAnSha/archive/2006/11/06/1368807.aspx
- 请问intraweb怎么响应flash的单击事件?
- 有像delphi对象监视器一样的控件吗
- 在DLL中用globalalloc函数申请应用程序共享内存,实现多个应用程序共享数据!行不通!!
- 学习用delphi写com程序看什么书好?
- ado通过ip远程连接sql2000数据库
- 如何更换软件皮肤?
- chenjiong(准程序员:升级中....) ,那么加强联系啦!
- **据说99%都会作错?,答对有分**
- 能说说怎么实现本地和网络上的数据库同步更新的原理吗
TInfo=class
s:String;
end;
var
i:TInfo;
begin
i:=TInfo.Create;
i.s:='NB';
StringList.AddObject('MyData',i);
读出信息可以用:
str:=TInfo(StringList.Objects[n]).s;
自己定义TInfo类,可以包含任意复杂的数据.