How to Re-dimension a Class Array Outside the Class DefinitionID: Q133744 The information in this article applies to:
SUMMARYVisual FoxPro allows you to re-dimension arrays outside their class definition. This article shows by example how to do it.
MORE INFORMATIONUser-defined structures (similar to types in Visual Basic, or structs in C) are possible through the Custom Class. and because Custom classes in Visual FoxPro can contain arrays, you can redimension arrays outside the class definition as needed.
Code SampleThe following code fragment illustrates how to do so. It uses a Custom class called sMystruct to define a set of variables and an array. The array name is Inventory_Onorder_Instock and it has an initial dimension of 1. The code redimensions the array to 2, and populates each element of the array with values from the Products table. Then it displays these values.
Additional reference words: 3.00 VFoxWin
KBCategory: kbprg kbcode
KBSubcategory: FxprgGeneral
|
Last Reviewed: August 2, 1995 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |