解决方案 »
- 把另一表中的一列添到
- StringGride
- TClientDataSet组件除了用SQL语句插入数据,还有没有其他方法。(急!)
- 江湖救急,在线等,小问题——如何拖动Panel上的一个Image
- idudpserver做聊天软件的困惑,高手请进.不盛感激!!!,UP有分
- 查询access表中的时间字段,如何将时间转换为文本输出
- 初学者请进,手把手教你学会用delphi制作发送邮件程序,并送源码
- 菜鸟问:求QueryTables的用法
- 找帮凶
- 按F12窗体显示不出来是怎么回事
- 急急急 delphi的asm怎么对串口操作没有反映?delphi高手请进.
- 在BHO编程中得到网页的源代码后,修改源代码后,如何使浏览器继续调用修改完的代码 在线等待
自己写吧,呵呵
var bz: Byte;
begin
bz:= b and $F;
b:= b shr 4;
HexByte:= HexDigs[b] + HexDigs[bz];
end;function HexWord(w: Word): string;
begin
HexWord := HexByte(HI(w)) + HexByte(LO(w));
end;function HexLong(l: Longint): string;
var x: record
case Boolean of
true: (a: Longint);
false: (l, h: Word);
end;
begin
x.a := l;
HexLong:= HexByte(HI(x.h)) +
HexByte(LO(x.h)) +
HexByte(HI(x.l)) +
HexByte(LO(x.l));
end (*HexWord*);In HexLong we use another pascal feature, called "the old case trick". In Pascal, it is possible to declare a record with a case statement. The compiler puts all variables declared in the case statement to the same adress, so in case of cases 8-) we can treat the variable as we like it. Here we put a longint and two word on each other, so we can write in the long value and read out as two words.