Dimensioned arrays have the advantage that each cell is directly addressable by the Runtime Engine. Dynamic arrays are addressed by one pointer to the entire string.
DIM MYARRAY(200) YOURARRAY = '' YOURARRAY<200> = 'BOOGER' MYARRAY(200) = 'BOOGER' What the Runtime Engine does for yourarray is first pad out the string with 199 attribute marks, and then write Booger at the end. What it does for myarray is calculate the position where cell 200 should be (varaddress + 200*10) and then JUMP directly to that position, and write Booger in that spot. It doesn't have to SCAN any existing string to find position 200, it jumps directly to the calculated offset in the run space. -----Original Message----- From: Bill Brutzman <[email protected]> To: U2 Users List <[email protected]> Sent: Fri, Jul 27, 2012 8:44 am Subject: [U2] Array Types I am surprised that anyone uses dimensioned arrays. I use dynamic arrays for everything. If there are any advantages that dimension arrays have over dynamic... please let me know... without getting sentimental. --Bill _______________________________________________ U2-Users mailing list [email protected] http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list [email protected] http://listserver.u2ug.org/mailman/listinfo/u2-users
