Quote from: del on February 15, 2021, 11:48:50 pmCode: Pascal [Select][+][-] buff[1] := 0;The first element of the array is 0 not 1.See Thaddy's warning above about doing this: the cure may be worse than the disease.Personally I'd use initialize:Code: Pascal [Select][+][-]procedure foo;var buffer : array[0..9] of byte;begin initialize(buffer, length(buffer)); ...Finally, you're replying to a 4 year old thread.
Code: Pascal [Select][+][-] buff[1] := 0;
Quote from: del on February 15, 2021, 11:48:50 pmCode: Pascal [Select][+][-] buff[1] := 0;The first element of the array is 0 not 1.
Code: Pascal [Select][+][-]buff: array[1..BUF_SIZE] of byte;