急!!!!

andyliumoujun 2003-09-11 06:59:34
请问sizeof和fillchar两个函数是怎么用的啊?????
...全文
27 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
hkbarton 2003-09-11
  • 打赏
  • 举报
回复
sizeof :
Description

Pass a Delphi variable reference to SizeOf to determine the number of bytes used to represent the variable. Pass a type identifier to SizeOf to determine the number of bytes used to represent instances of that type. SizeOf is useful for determining the amount of memory to specify for the FillChar, Move, or GetMem procedures.

Delphi syntax:

procedure FillChar(var X; Count: Integer; Value: Byte);

Description

In Delphi, FillChar fills Count contiguous bytes (referenced by X) with the value specified by Value (Value can be type Byte or Char).

Warning: This function does not perform any range checking.
andyliumoujun 2003-09-11
  • 打赏
  • 举报
回复
能举个例子说明一下这两个函数的参数的意义吗???
hmzgz81 2003-09-11
  • 打赏
  • 举报
回复
function SizeOf(X): Integer;
用来传递变量的



procedure FillChar(var X; Count: Integer; Value: Byte);
用来计算字节数的!

5,386

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧