Reputation: 707
I'm a C programmer came across this Delphi function and have a few questions.
procedure Init(const key; size: Integer; filler: Byte = $FF); overload
key
doesn't have a type specified, what is the type of it in this case?$FF
" means for the variable filler
?Upvotes: 2
Views: 860
Reputation: 136391
The Key
parameter is an untyped parameter. You can found more info in this great article from Rob Kennedy, What is an untyped parameter?
The $FF
value (0xFF hex, 255 decimal) for the filler parameter is a default value, so if you do not assign a value to this parameter, the filler will take the default value.
When you call the init procedure you can call in these two ways:
Init(Data,1,19);//in this case the key parameter is set to 19
or
Init(Data,1); //in this case the key parameter is set to $FF
Upvotes: 6
Reputation: 345
$FF is default value for variable filler, key is an constant value of any type. It maybe integer or int64 type
Upvotes: 0