dbTalk Databases Forums  

VFP Array Element Handling Gotcha

comp.databases.xbase.fox comp.databases.xbase.fox


Discuss VFP Array Element Handling Gotcha in the comp.databases.xbase.fox forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Rush Strong
 
Posts: n/a

Default Re: VFP Array Element Handling Gotcha - 02-12-2008 , 07:49 PM






Rush Strong wrote:
Quote:
Gene Wirchenko wrote:
I just got bit in a minor way with the way that VFP handles array
elements. Consider the following code:
snip
It appears that Fox locates twod[4,3] by locating the element
corresponding to the start of the logical fourth row by multiplying
the declared number of columns (2) times 4 - which is element number 7
Oops, I meant to say columns * (4 - 1) + 1, to get the start of the
logical fourth row - still element number 7.

- Rush


Reply With Quote
  #12  
Old   
Rush Strong
 
Posts: n/a

Default Re: VFP Array Element Handling Gotcha - 02-12-2008 , 07:49 PM






Rush Strong wrote:
Quote:
Gene Wirchenko wrote:
I just got bit in a minor way with the way that VFP handles array
elements. Consider the following code:
snip
It appears that Fox locates twod[4,3] by locating the element
corresponding to the start of the logical fourth row by multiplying
the declared number of columns (2) times 4 - which is element number 7
Oops, I meant to say columns * (4 - 1) + 1, to get the start of the
logical fourth row - still element number 7.

- Rush


Reply With Quote
  #13  
Old   
Rush Strong
 
Posts: n/a

Default Re: VFP Array Element Handling Gotcha - 02-12-2008 , 07:49 PM



Rush Strong wrote:
Quote:
Gene Wirchenko wrote:
I just got bit in a minor way with the way that VFP handles array
elements. Consider the following code:
snip
It appears that Fox locates twod[4,3] by locating the element
corresponding to the start of the logical fourth row by multiplying
the declared number of columns (2) times 4 - which is element number 7
Oops, I meant to say columns * (4 - 1) + 1, to get the start of the
logical fourth row - still element number 7.

- Rush


Reply With Quote
  #14  
Old   
Rush Strong
 
Posts: n/a

Default Re: VFP Array Element Handling Gotcha - 02-12-2008 , 07:49 PM



Rush Strong wrote:
Quote:
Gene Wirchenko wrote:
I just got bit in a minor way with the way that VFP handles array
elements. Consider the following code:
snip
It appears that Fox locates twod[4,3] by locating the element
corresponding to the start of the logical fourth row by multiplying
the declared number of columns (2) times 4 - which is element number 7
Oops, I meant to say columns * (4 - 1) + 1, to get the start of the
logical fourth row - still element number 7.

- Rush


Reply With Quote
  #15  
Old   
Rush Strong
 
Posts: n/a

Default Re: VFP Array Element Handling Gotcha - 02-12-2008 , 07:49 PM



Rush Strong wrote:
Quote:
Gene Wirchenko wrote:
I just got bit in a minor way with the way that VFP handles array
elements. Consider the following code:
snip
It appears that Fox locates twod[4,3] by locating the element
corresponding to the start of the logical fourth row by multiplying
the declared number of columns (2) times 4 - which is element number 7
Oops, I meant to say columns * (4 - 1) + 1, to get the start of the
logical fourth row - still element number 7.

- Rush


Reply With Quote
  #16  
Old   
Rush Strong
 
Posts: n/a

Default Re: VFP Array Element Handling Gotcha - 02-12-2008 , 07:49 PM



Rush Strong wrote:
Quote:
Gene Wirchenko wrote:
I just got bit in a minor way with the way that VFP handles array
elements. Consider the following code:
snip
It appears that Fox locates twod[4,3] by locating the element
corresponding to the start of the logical fourth row by multiplying
the declared number of columns (2) times 4 - which is element number 7
Oops, I meant to say columns * (4 - 1) + 1, to get the start of the
logical fourth row - still element number 7.

- Rush


Reply With Quote
  #17  
Old   
Rush Strong
 
Posts: n/a

Default Re: VFP Array Element Handling Gotcha - 02-12-2008 , 07:49 PM



Rush Strong wrote:
Quote:
Gene Wirchenko wrote:
I just got bit in a minor way with the way that VFP handles array
elements. Consider the following code:
snip
It appears that Fox locates twod[4,3] by locating the element
corresponding to the start of the logical fourth row by multiplying
the declared number of columns (2) times 4 - which is element number 7
Oops, I meant to say columns * (4 - 1) + 1, to get the start of the
logical fourth row - still element number 7.

- Rush


Reply With Quote
  #18  
Old   
Rush Strong
 
Posts: n/a

Default Re: VFP Array Element Handling Gotcha - 02-12-2008 , 07:49 PM



Rush Strong wrote:
Quote:
Gene Wirchenko wrote:
I just got bit in a minor way with the way that VFP handles array
elements. Consider the following code:
snip
It appears that Fox locates twod[4,3] by locating the element
corresponding to the start of the logical fourth row by multiplying
the declared number of columns (2) times 4 - which is element number 7
Oops, I meant to say columns * (4 - 1) + 1, to get the start of the
logical fourth row - still element number 7.

- Rush


Reply With Quote
  #19  
Old   
Rush Strong
 
Posts: n/a

Default Re: VFP Array Element Handling Gotcha - 02-12-2008 , 07:49 PM



Rush Strong wrote:
Quote:
Gene Wirchenko wrote:
I just got bit in a minor way with the way that VFP handles array
elements. Consider the following code:
snip
It appears that Fox locates twod[4,3] by locating the element
corresponding to the start of the logical fourth row by multiplying
the declared number of columns (2) times 4 - which is element number 7
Oops, I meant to say columns * (4 - 1) + 1, to get the start of the
logical fourth row - still element number 7.

- Rush


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.