How to Create an Array of Structures in Visual FoxProID: Q133455 The information in this article applies to:
SUMMARYUser-defined structures (similar to user-defined types in Visual Basic or structs in C) are possible by using the CUSTOM Class. This article shows by example how to create a user-defined array of structures.
MORE INFORMATIONThe following code sample illustrates how to define an array of structures. The structure itself is defined in a custom class called sMyStruct. The code reads the values from the Products table and populates the array of structures.
Code SampleOPEN DATABASE C:\VFP\SAMPLES\DATA\TESTDATA.DBC USE C:\VFP\SAMPLES\DATA\PRODUCTS.DBF FOR i=1 to 10
ENDFOR
DEFINE CLASS sMyStruct AS CUSTOM ENDDEFINE
Additional reference words: 3.00 struct VB VFoxWin KBCategory: kbprg kbcode KBSubcategory: FxprgGeneral |
Last Reviewed: August 1, 1995 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |