a_bubas_sign Posted May 14, 2004 Posted May 14, 2004 What is the simplest way to move a single dimension array into the column (or row) of a two dimensional array?
Developers Jos Posted May 14, 2004 Developers Posted May 14, 2004 (edited) Dim $aIn[10] Dim $aOut[10][2] ; fill $aIn with something for $x = 0 to ubound($aIn) -1 $aOut[$x][0] = $aIn[$x] Next EDIT: Added -1 on the For statement Edited May 14, 2004 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Valik Posted May 14, 2004 Posted May 14, 2004 I think JdeB meant UBound($aIn) - 1, otherwise you will get an overflow error.
Developers Jos Posted May 14, 2004 Developers Posted May 14, 2004 yea Valik is Right ... ... I should do the testing before posting SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
a_bubas_sign Posted May 14, 2004 Author Posted May 14, 2004 (edited) Thanks guys I am already doing something similar. Guess I should have posted the code. I was using the "While . . . Wend" statement set. Is the "For . . . Next" any faster? I was actually hoping there was a way do this on one line of code like a simple assignment : $2darray[1] = $1darray but I guess that would be to easy. Thanks again. Edited May 14, 2004 by a_bubas_sign
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now