Board index » delphi » Determining variable type at runtime in Delphi 1.0

Determining variable type at runtime in Delphi 1.0

How can i know which type is a variable (string, integer, boolean, etc.)
at runtime with Delphi 1.0 ?

 

Re:Determining variable type at runtime in Delphi 1.0


How can i know which type is a variable (string, integer, boolean, etc.)
at runtime with Delphi 1.0 ?

Re:Determining variable type at runtime in Delphi 1.0


Quote
> How can i know which type is a variable (string, integer, boolean, etc.)
> at runtime with Delphi 1.0 ?

Demy, i'm afraid the question does not make much sense to me. Can you give
a short example of what you intend to do? Oh, if its how to find out the
type of an untyped Var parameter, you cannot. It is called untyped for a
good reason <g>.

Peter Below (TeamB)  100113.1...@compuserve.com)

Re:Determining variable type at runtime in Delphi 1.0


Quote
Peter Below wrote:

> > How can i know which type is a variable (string, integer, boolean, etc.)
> > at runtime with Delphi 1.0 ?

> Demy, i'm afraid the question does not make much sense to me. Can you give
> a short example of what you intend to do? Oh, if its how to find out the
> type of an untyped Var parameter, you cannot. It is called untyped for a
> good reason <g>.

> Peter Below (TeamB)  100113.1...@compuserve.com)

Hi Peter, first, thanks for your help..

I mean, is there a function in Delphi 1.0 that returns the type of a
variable: example  

   var a: string;
   var b: integer;
   ....

   a:=DATATYPE(b)

Thanks another time. Have a nice day

Re:Determining variable type at runtime in Delphi 1.0


Quote
Peter Below wrote:

> > How can i know which type is a variable (string, integer, boolean, etc.)
> > at runtime with Delphi 1.0 ?

> Demy, i'm afraid the question does not make much sense to me. Can you give
> a short example of what you intend to do? Oh, if its how to find out the
> type of an untyped Var parameter, you cannot. It is called untyped for a
> good reason <g>.

> Peter Below (TeamB)  100113.1...@compuserve.com)

Oh, yes, Peter,i got confused...

I only wanted to validate inputs in TEdit, cause i use string types in
them... forget my question and excuse me...

Thanks the same...

Other Threads