在程序中,如何得到参数,变量的类型,用那一个函数?

解决方案 »

  1.   

    eturns a registered persistent class given its name.UnitClassesCategorystreaming utilitiesfunction GetClass(const ClassName: string): TPersistentClass;DescriptionCall GetClass to obtain a class from a class name. This class can be used as a parameter to routines that require a class. The Class must be registered before GetClass can find it.  Form classes and component classes that are referenced in a form declaration (instance variables) are automatically registered when the form is loaded.  Other classes can be registered by calling RegisterClass or RegisterClasses.
      

  2.   

    VarType()返回值:VarType Contents of variantvarEmpty The variant is Unassigned.
    varNull The variant is Null.
    varSmallint 16-bit signed integer (type Smallint).
    varInteger 32-bit signed integer (type Integer).
    varSingle Single-precision floating-point value (type Single).
    varDouble Double-precision floating-point value (type Double).
    varCurrency Currency floating-point value (type Currency).
    varDate Date and time value (type TDateTime).
    varOleStr Reference to a dynamically allocated UNICODE string.varDispatch Reference to an Automation object (an IDispatch interface pointer).
    varError Operating system error code.
    varBoolean 16-bit boolean (type WordBool).
    varVariant A variant.
    varUnknown Reference to an unknown OLE object (an IInterface or IUnknown interface pointer).
    varShortInt 8-bit signed integer (type ShortInt)
    varByte A Byte
    varWord unsigned 16-bit value (Word)
    varLongWord unsigned 32-bit value (LongWord)
    varInt64 64-bit signed integer (Int64)varStrArg COM-compatible string.
    varString Reference to a dynamically allocated string (not COM compatible).
    varAny A CORBA Any value.const
      varEmpty    = $0000;
      varNull     = $0001;
      varSmallint = $0002;
      varInteger  = $0003;
      varSingle   = $0004;
      varDouble   = $0005;
      varCurrency = $0006;
      varDate     = $0007;
      varOleStr   = $0008;
      varDispatch = $0009;
      varError    = $000A;
      varBoolean  = $000B;
      varVariant  = $000C;
      varUnknown  = $000D;
      varShortInt = $0010;
      varByte     = $0011;
      varWord     = $0012;
      varLongWord = $0013;
      varInt64    = $0014;
      varStrArg   = $0048;
      varString   = $0100;
      varAny      = $0101; 
      varTypeMask = $0FFF;
      varArray    = $2000;
      varByRef    = $4000;
      

  3.   

    VarType()返回值:VarType Contents of variantvarEmpty The variant is Unassigned.
    varNull The variant is Null.
    varSmallint 16-bit signed integer (type Smallint).
    varInteger 32-bit signed integer (type Integer).
    varSingle Single-precision floating-point value (type Single).
    varDouble Double-precision floating-point value (type Double).
    varCurrency Currency floating-point value (type Currency).
    varDate Date and time value (type TDateTime).
    varOleStr Reference to a dynamically allocated UNICODE string.varDispatch Reference to an Automation object (an IDispatch interface pointer).
    varError Operating system error code.
    varBoolean 16-bit boolean (type WordBool).
    varVariant A variant.
    varUnknown Reference to an unknown OLE object (an IInterface or IUnknown interface pointer).
    varShortInt 8-bit signed integer (type ShortInt)
    varByte A Byte
    varWord unsigned 16-bit value (Word)
    varLongWord unsigned 32-bit value (LongWord)
    varInt64 64-bit signed integer (Int64)varStrArg COM-compatible string.
    varString Reference to a dynamically allocated string (not COM compatible).
    varAny A CORBA Any value.const
      varEmpty    = $0000;
      varNull     = $0001;
      varSmallint = $0002;
      varInteger  = $0003;
      varSingle   = $0004;
      varDouble   = $0005;
      varCurrency = $0006;
      varDate     = $0007;
      varOleStr   = $0008;
      varDispatch = $0009;
      varError    = $000A;
      varBoolean  = $000B;
      varVariant  = $000C;
      varUnknown  = $000D;
      varShortInt = $0010;
      varByte     = $0011;
      varWord     = $0012;
      varLongWord = $0013;
      varInt64    = $0014;
      varStrArg   = $0048;
      varString   = $0100;
      varAny      = $0101; 
      varTypeMask = $0FFF;
      varArray    = $2000;
      varByRef    = $4000;
      

  4.   

    这个嘛,看帮助啊var i:Integer;VarType(i)//其返回值上面写了
      

  5.   

    to ehom:
      你真行!