integer(s)到底是把s转换为整数类型 还是取得s的首地址 谁能将下面的代码点明一下 谢谢var S: String;L: Integer;
begin
S := 'hello';
L := PInteger(Integer(S) - 4)^;
//或者 L := PInteger(PInteger(@S)^ - 4)^;
//或者 L := PInteger(PInteger(Addr(S))^ - 4)^;
begin
S := 'hello';
L := PInteger(Integer(S) - 4)^;
//或者 L := PInteger(PInteger(@S)^ - 4)^;
//或者 L := PInteger(PInteger(Addr(S))^ - 4)^;
解决方案 »
- ClientDataSet.xml是什么样的格式?
- 很急!在windows2003中,delphi7如何调试Com+ ? 注意是在WINDOWS SERVER 2003 中!!!
- 诚征深圳delphi专职开发人员!
- 如何给你个字符串前补零
- 求一个思路请大家指点~~~~~
- 请问 TADOQuery 怎么查询 edit1 中提供的字符串
- delphi的FORM中如何处理字幕在移动过程中出现的屏幕抖动?
- cxgrid 一行多个checkbox的问题
- 对昨天捧场的大虾们表示感谢!今天来问个关于调用外部程序的问题???
- 一个对你很简单的问题
- 给配置文件ini加个密!如何做到啊?抢分题!
- 急!大侠们,帮忙查查错呀!使用ClientDataSet向数据库保存文件。
Integer(S):是取得S字串的首地址,-4地址的前4个字节的位置。
PInteger():将串S的前4个字节的地址转换成整数指针
PInteger()^:取得这个整数值。
内存中应该是这样的排列:
00 00 00 00 h e l l o
{整数L的值}