Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

News array column on the right

Status
Not open for further replies.

WyoDave

Programmer
Feb 28, 2007
1
US
Is there a better way of adding a column on the right side of an array than this?

Code:
PUBLIC ARRAY gaDave(2,2)
nRows = 2
nCols = 3

DIMENSION gaDave(nRows * nCols)

nElements = ALEN(gaDave)
FOR nCnt = 1 TO nElements
	IF MOD(nCnt, nCols) = 0 AND nCnt < nElements
		=AINS(gaDave, nCnt)
	ENDIF
ENDFOR

DIMENSION gaDave(nRows, nCols)
 
Perhaps this way? Create cursor, Append from array, Alter table cursoalias, Select into array?

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top