Following is the code in which I try to declare class variable:
type TMyClass = class
private
class function ABC(myID : integer): string;
public
class var s: String;
class function XYZ: string;
end;
I am getting error: PROCEDURE or FUNCTION expected. Is there any change in syntax of class variable in Delphi 7?
Delphi 7 didn't support class variables. You'll have to find another way of solving your problem. An easy fix is probably just to make it be a global variable of the enclosing unit instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With