This code
This code
procedure Foo;
var
arr: TArray;
d: Double;
begin
for d in arr do
;
end;
Produces this hint:
[dcc32 Hint] Project1.dpr: H2077 Value assigned to 'd' never used
Anyone know a good way to suppress the bogus hint? I would prefer keep using a for/in loop rather than a classic for loop, but I'm beginning to feel that the classic for loop is the least painful option. I want to use the for/in loop because in various other places in my code I use the for/in and use the loop value and want to have consistency across related code blocks.
procedure Foo;
var
arr: TArray
d: Double;
begin
for d in arr do
;
end;
Produces this hint:
[dcc32 Hint] Project1.dpr: H2077 Value assigned to 'd' never used
Anyone know a good way to suppress the bogus hint? I would prefer keep using a for/in loop rather than a classic for loop, but I'm beginning to feel that the classic for loop is the least painful option. I want to use the for/in loop because in various other places in my code I use the for/in and use the loop value and want to have consistency across related code blocks.
If 0=1 then break; will be eliminated by the linker.
ReplyDeleteMason Wheeler I use linked-lists whenever possible in multi-threading, the main advantage being minimal and guaranteed constant time for insertion/deletions, which in turns means simple Multi-Read Single-Write logic remains efficient even with high concurrency.
ReplyDeleteAlso I use singly-linked lists as convenient and simple LIFO queues (eliminating the need for container collections).