Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
#DEFINE / Arrays
Message
From
27/05/1999 12:56:39
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00223511
Message ID:
00223543
Views:
34
>How would you populate the array using #DEFINE?
>
>As for usage, I have a static array thatI reference
>many places throughout my app.
Hmm. I would either use a public array or oApp custom object :
*main.prg
oApp = createobject("oApp")
FOR ix = 1 to 3
  FOR px = 1 to 5
    ? oApp.myArray[ix,px]
  ENDFOR
ENDFOR


DEFINE class oApp as custom
  DIMENSION myArray[3,5] = .f.
  PROCEDURE init
  FOR ix = 1 to 3
    FOR px = 1 to 5
      this.myArray[ix,px] = ix*px
    ENDFOR
  ENDFOR
ENDPROC
ENDDEFINE
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform