下载此文档

delphi参数传递(Delphi参数传递).doc


文档分类:IT计算机 | 页数:约10页 举报非法文档有奖
1/10
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/10 下载此文档
文档列表 文档介绍
delphi参数传递(Delphi参数传递)
Delphi parameter passing
Parameter passing
The arguments used to declare / implement a procedu (I); (I =1}
Showmessage (I): (i:=1; the argument has not changed}
ByRef (I); {I =2)
Showmessage (I): (i:=2, the argument changed}
End;
A parameter passed by value can specify a default value, such as the ByVai above:
Procedure ByVai (I: Integer = 0):
When you call it, you can omit arguments that have default values: ByVai. Parameters with default values must be at the end of the parameter list, such as:
Procedure ByVai (I:, Integer = 0, B:, Boolean):
No, it should be changed to..:
Procedure ByVai (B: Boolean; I: Integer = 0):
Because the default value must be a constant expression, so dynamic-array procedural, class, class-reference, and interface nil can be specified by default: and the parameters of record, variant, file and static-array type can not specify a default value.
If you pass arguments to a pointer type by value, the situation becomes complicated and interesting. At this point, what is the actual transmission? Is it a copy of the actual data? No, it's a copy of the pointer. That is, the parameter and argument are two pointers, but the two pointers point to the same address. So at this point, the parameters and arguments can be shared and they point to the data in the address, but if the pointer to the parameter is changed, the pointer

delphi参数传递(Delphi参数传递) 来自淘豆网m.daumloan.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数10
  • 收藏数0 收藏
  • 顶次数0
  • 上传人小健
  • 文件大小85 KB
  • 时间2022-05-20