I have no solution for you but I just wanted to show everyone a little anytype test I've tried to check your statement:

    anytype typeFreeVar;

    typeFreeVar = "sdf";
    info(strfmt("%1", typeFreeVar));
    typeFreeVar = 54.2;
    typeFreeVar += 54.2; // will result in : 54.254.2.  Weird
    info(strfmt("%1", typeFreeVar));
    typeFreeVar = 150;
    typeFreeVar += 1; // will result in : 1501
    info(strfmt("%1", typeFreeVar));
    typeFreeVar = 01\01\2006;
    info(strfmt("%1", typeFreeVar));

typeFreeVar seems to be bound to the first type of variable encountered (in this case, a string).  If I initialize it with an int it will react as an int.

Regards,

Steeve...


-----Message d'origine-----
De : [email protected] [mailto:[EMAIL PROTECTED] De la part de gollywogman
Envoyé : 10 février 2006 07:52
À : [email protected]
Objet : [development-axapta] Variant, COMVariant

Hi All

I currently need a variable that is of no type. That is, a variable of
type variant. Is there anyone who knows how to declare a variable of
this type. At the moment, I've tried several variations of the form

COMVariant var;
;
var = new COMVariant(COMVariantInOut::In_out, COMVariantType::VT_DATE);
.

I've put in hundreds of permutations of each parameter, including
VT_VARIANT for the 2nd one, but nothing seems to work. I've also tried
to use X++ 's built in types like void or AnyType, but neither of
these work. Is there anyone who has a solution. Thanks

Brandon









Yahoo! Groups Links











SPONSORED LINKS
Computer part Programming languages Microsoft axapta
Support exchange


YAHOO! GROUPS LINKS




Reply via email to