Posts: 1487
Joined: Tue Jun 14, 2016 07:51 AM
Re: Create a variable
Posted: Wed Nov 16, 2022 09:53 AM
Natter wrote:Thanks Antonio, but this is somewhat not what I need. For example, I need to make 10 variables
for st=1 to 10
create variable "n_"+ltrim(str(st))
next
Maybe better use a array ?
Local aGallery := ARRAY(12) // Max = 12 items
is very easy to programmaticaly fill these with specific data in a loop
for i = 1 to len(aGallery)
aGallery
= i // or any dbf value or .....
next
You only have to think of 1 var name .... (Local of public,...)
Marc Venken
Using: FWH 23.08 with Harbour