Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Many variables vs array
Message
From
14/11/2020 09:39:50
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01677141
Message ID:
01677142
Views:
90
Depends. If the values are related, like different days of a month, use an array. If not, use properties with proper names.

What kind of data will go into these properties?

>Hi,
>
>I need to add some properties (all of type string) to the application class/object. It will probably start with about 10 but may grow to about 70 variables (in time). I can create each as a separate string property or combine them all into an array property.
>Example:
>
>oApp.Property1 
>oApp.Property2
>*-- vs
>oApp.aProperty[1]
>oApp.aProperty[2]
>
>
>Which approach is a better practice, in terms of memory management at run-time?
>
>TIA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform