Recent

Author Topic: itlliminating Hint: Function result variable does not seem to be initialized  (Read 307 times)

Prime

  • Jr. Member
  • **
  • Posts: 63
Hi all,

I have several functions that call other procedures / functions with result being assigned as a var parameter to the called procedure, so it does get set correctly.

Something like :

Code: [Select]
FUNCTION TRamothMemoryStream.ReadByte : BYTE;

BEGIN;
  Read(Result,SizeOf(Result));
END;               

However I keep getting the does not seem to be initialized message, is there a way of telling the compiler that it will be altered by the called routine so I don't get the warning?

Cheers.

Phill.

jamie

  • Hero Member
  • *****
  • Posts: 6587
1:Please use code tags

2:Try using "OUT" instead of "VAR". the compiler should ignore that one.
The only true wisdom is knowing you know nothing

 

TinyPortal © 2005-2018