Questions tagged [fillchar]

2 questions
12
votes
2 answers

Why is a Currency variable treated as a constant with FillChar in Delphi?

The following code should compile and does compile with many other types. However, the compiler reports a "Constant object cannot be passed as var parameter" error - despite the variable quite obviously being a variable. program…
Disillusioned
  • 14,635
  • 3
  • 43
  • 77
1
vote
1 answer

How to use FillChar to fill a 3D integer array (four bytes) in Delphi?

I know this works: type _AAAB = array of array of array of byte; procedure fillArray(var arr: _AAAB; const v: byte); overload; var i, j, k: integer; begin for i := 0 to High(arr) do begin for j := 0 to High(arr[i]) do begin …
justyy
  • 5,831
  • 4
  • 40
  • 73