I'm getting an error with Delphi 7 on for in loop when compiling this code <a href="https://theroadtodelphi.wordpress.c...ing-object-pascal-delphi-fpc-and-the-tsmbios/" rel="nofollow">Link</a>
Error message:
<blockquote>
[Error] Project1.dpr(52): Operator not applicable to this operand type
</blockquote>
Any alternative way ? or how can I fix it ?
Code:
procedure GetProcessorInfo;
Var
SMBios : TSMBios;
LProcessorInfo : TProcessorInformation;
LSRAMTypes : TCacheSRAMTypes;
begin
SMBios:=TSMBios.Create;
try
WriteLn('Processor Information');
if SMBios.HasProcessorInfo then
for LProcessorInfo in SMBios.ProcessorInfo do // <-- Error here
begin
...
end;
...
end;
Error message:
<blockquote>
[Error] Project1.dpr(52): Operator not applicable to this operand type
</blockquote>
Any alternative way ? or how can I fix it ?