Pascal is strongly typed, so this kind of fast-and-loose assignment is not regarded as good practice. But you can assign any simple (ie non-structured type) to a Variant:
Type
TMyEnum = (One,Two,Three);
Var
V : Variant;
I : Integer;
B : Byte;
W : Word;
Q : Int64;
E : Extended;
D : Double;
En : TMyEnum;
AS : AnsiString;
WS : WideString;
begin
V:=I;
V:=B;
V:=W;
V:=Q;
V:=E;
V:=En;
V:=D:
V:=AS;
V:=WS;
end;
They can be useful for COM objects and Interfaces. I've only used them when programming compilers, where they are handy for containing the next token.
Personally I wouldn't recommend using them under ordinary circumstances, because they cannot be optimised, since the compiler doesn't know the type of the assignment to a variant until run time. This means they will be substantially slower than typed variables.
As far as extending Tier 1 with OOP stuff etc goes, this has been argued to death in the forum. Maybe I should make a few videos to show that Pascal is just as easy to use as Basic, and all these goodies come with it. There's no real need to keep re-inventing the wheel.
-- Jim DO IT FASTER, EASIER AND BETTER WITH AppGameKit FOR PASCAL