![]() |
|
|
|
|
|
|
|
|
6
19th October 17:56
External User
Posts: 1
|
* c_w_finch@hotmail.com <c_w_finch@hotmail.com>:
It'd be more useful if you stated *what* error you're getting and on what line of code. You might also want to think about saying how you know, for sure, that the array is empty at that time. -- Dave Pearson | OSLib - Timeslice release functions. http://www.davep.org/ | eg - Norton Guide reader for Linux. http://www.davep.org/clipper/ | weg - Norton Guide reader for Windows. http://www.davep.org/norton-guides/ | dgscan - DGROUP scanner for Clipper. |
|
|
9
19th October 17:57
External User
Posts: 1
|
* valusoft @ mbox.com.au (Ross McKenzie) <valusoft@mbox.com.au>:
Although it isn't at all clear that this is the problem with the OP, is it? Given the name of the function the result might be confusing given an array like { 1, "two", 3, nil, 5, "six", nil }. ObWarning: Looping on LEN( a ) vs storing LEN( a ) to a variable and using that as the TO value. ObWhoCanResistShorterCodeTweak: ,---- | Function ArrayLen( a ) | Return( max( 0, ascan( a, NIL ) - 1 ) ) `---- -- Dave Pearson | OSLib - Timeslice release functions. http://www.davep.org/ | eg - Norton Guide reader for Linux. http://www.davep.org/clipper/ | weg - Norton Guide reader for Windows. http://www.davep.org/norton-guides/ | dgscan - DGROUP scanner for Clipper. |
|