Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strong declaration?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00552778
Message ID:
00552903
Views:
17
>Hi all,
>
>What is the difference when declaring a variable using AS option and not using it?
>
>
>local m.myInteger
>?type('m.myInteger') && 'L'
>
>local m.myOtherInteger AS Integer
>?type('m.myOtherInteger') && 'L'
>
>
>I was hoping that on the second declaration, m.myOtherInteger would have defaulted to 0. Aside from knowing that the variable will become an integer somewhere in the code, I don't see any advantage to declaring it with the AS keyword.
>
>Thoughts please.

The declaration is only advisory and has no effect on your coding or program unless you are creating a COM object interface to your methods.
Previous
Reply
Map
View

Click here to load this message in the networking platform