nageswaragunupudi wrote:Should work.
This works for me:
- Code: Select all Expand view RUN
local aTemp := { { "C1", 1, 1 }, { "C2", 1, 2 }, { "C3", 1, 3 } }
local cVarName := "ONE"
local n
for n := 1 to 3
cVarName := aTemp[ n, 1 ]
&cVarName := STRZERO( aTemp[ n, 2 ], 2 ) + STRZERO( aTemp[ n, 3 ], 2 )
next
? M->C1, M->C2, M->C3
result:
0101
0102
0103
Nages,
I'm creating the array in this mode:
I explain you
crea_lista(ncapofila,lCapofila)
sample :
crea_lista(1,.f.)
if lCapofila is false the function creates me an array with two numbers of which the first is the leader
if lCapofila is true
the function creates me an array with two numbers from 1 to 89/90
the problem in the second case is that it creates about
4097 records
how do i intercept the same ones?
- Code: Select all Expand view RUN
Function crea_lista(ncapofila,lCapofila)
Local adata:={}
Local num1
local num2:=2
local nContatore:=1
IF !lCapofila
num1:=1
do while ((num1) < 90)
do while ((num2) <= 90)
aadd(adata,{"C"+ltrim(str(nContatore)),num1,num2})
num2:= num2 + 1
ncontatore:=nContatore+1
enddo
*ncontatore:=nContatore+1
num1:= num1 + 1
num2:= num1 + 1
Enddo
else
num1:=ncapofila
do while ((num2) <= 90)
aadd(adata,{"C"+ltrim(str(nContatore)),num1,num2})
num2:= num2 + 1
ncontatore:=nContatore+1
enddo
Endif
return adata
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com