![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I just got bit in a minor way with the way that VFP handles array elements. Consider the following code: local twod(10,2) for i=1 to 10 for j=1 to 2 twod(i,j)=10*i+j endfor endfor ? twod(4,3) Note the array dimensions and the reference. The reference is treated as being the third element starting in row 4 with VFP not checking against the declared dimension. The reference is treated as referring to twod(5,1), not as being an error. The docs do say that 2-D arrays can be accessed as 1-D. The implementation appears to be more general than that. Forewarned is forearmed and all that. |
#3
| |||
| |||
|
|
I just got bit in a minor way with the way that VFP handles array elements. Consider the following code: local twod(10,2) for i=1 to 10 for j=1 to 2 twod(i,j)=10*i+j endfor endfor ? twod(4,3) Note the array dimensions and the reference. The reference is treated as being the third element starting in row 4 with VFP not checking against the declared dimension. The reference is treated as referring to twod(5,1), not as being an error. The docs do say that 2-D arrays can be accessed as 1-D. The implementation appears to be more general than that. Forewarned is forearmed and all that. |
#4
| |||
| |||
|
|
I just got bit in a minor way with the way that VFP handles array elements. Consider the following code: local twod(10,2) for i=1 to 10 for j=1 to 2 twod(i,j)=10*i+j endfor endfor ? twod(4,3) Note the array dimensions and the reference. The reference is treated as being the third element starting in row 4 with VFP not checking against the declared dimension. The reference is treated as referring to twod(5,1), not as being an error. The docs do say that 2-D arrays can be accessed as 1-D. The implementation appears to be more general than that. Forewarned is forearmed and all that. |
#5
| |||
| |||
|
|
I just got bit in a minor way with the way that VFP handles array elements. Consider the following code: local twod(10,2) for i=1 to 10 for j=1 to 2 twod(i,j)=10*i+j endfor endfor ? twod(4,3) Note the array dimensions and the reference. The reference is treated as being the third element starting in row 4 with VFP not checking against the declared dimension. The reference is treated as referring to twod(5,1), not as being an error. The docs do say that 2-D arrays can be accessed as 1-D. The implementation appears to be more general than that. Forewarned is forearmed and all that. |
#6
| |||
| |||
|
|
I just got bit in a minor way with the way that VFP handles array elements. Consider the following code: local twod(10,2) for i=1 to 10 for j=1 to 2 twod(i,j)=10*i+j endfor endfor ? twod(4,3) Note the array dimensions and the reference. The reference is treated as being the third element starting in row 4 with VFP not checking against the declared dimension. The reference is treated as referring to twod(5,1), not as being an error. The docs do say that 2-D arrays can be accessed as 1-D. The implementation appears to be more general than that. Forewarned is forearmed and all that. |
#7
| |||
| |||
|
|
I just got bit in a minor way with the way that VFP handles array elements. Consider the following code: local twod(10,2) for i=1 to 10 for j=1 to 2 twod(i,j)=10*i+j endfor endfor ? twod(4,3) Note the array dimensions and the reference. The reference is treated as being the third element starting in row 4 with VFP not checking against the declared dimension. The reference is treated as referring to twod(5,1), not as being an error. The docs do say that 2-D arrays can be accessed as 1-D. The implementation appears to be more general than that. Forewarned is forearmed and all that. |
#8
| |||
| |||
|
|
I just got bit in a minor way with the way that VFP handles array elements. Consider the following code: local twod(10,2) for i=1 to 10 for j=1 to 2 twod(i,j)=10*i+j endfor endfor ? twod(4,3) Note the array dimensions and the reference. The reference is treated as being the third element starting in row 4 with VFP not checking against the declared dimension. The reference is treated as referring to twod(5,1), not as being an error. The docs do say that 2-D arrays can be accessed as 1-D. The implementation appears to be more general than that. Forewarned is forearmed and all that. |
#9
| |||
| |||
|
|
I just got bit in a minor way with the way that VFP handles array elements. Consider the following code: local twod(10,2) for i=1 to 10 for j=1 to 2 twod(i,j)=10*i+j endfor endfor ? twod(4,3) Note the array dimensions and the reference. The reference is treated as being the third element starting in row 4 with VFP not checking against the declared dimension. The reference is treated as referring to twod(5,1), not as being an error. The docs do say that 2-D arrays can be accessed as 1-D. The implementation appears to be more general than that. Forewarned is forearmed and all that. |
#10
| |||
| |||
|
|
I just got bit in a minor way with the way that VFP handles array elements. Consider the following code: local twod(10,2) for i=1 to 10 for j=1 to 2 twod(i,j)=10*i+j endfor endfor ? twod(4,3) Note the array dimensions and the reference. The reference is treated as being the third element starting in row 4 with VFP not checking against the declared dimension. The reference is treated as referring to twod(5,1), not as being an error. The docs do say that 2-D arrays can be accessed as 1-D. The implementation appears to be more general than that. Forewarned is forearmed and all that. |
![]() |
| Thread Tools | |
| Display Modes | |
| |