Hi all,
  how can i simple get type of variable in freepascal?

For example:

procedure RawWrite(v:anyvariable)
begin
if GETTYPE(v)=string_type then begin;stringwork(v);end;
if GETTYPE(v)=byte_type then begin;dobyte(v);end;
if GETTYPE(v)=pchar_type then...
if GETTYPE(v)=pointer_type then...
etc...
etc...
end;

or use a CASE statement


Is there any way to detect variable type?

Thank you.
_______________________________________________
fpc-other maillist  -  fpc-other@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-other

Reply via email to