Thank you, fxm.
Your routine is about 10% faster than my solution.
I appreciate the problems a UDT has with non-fixed length strings and attempts at cross-assignment.
That aside . . .
For my original code that I posted, the error messages are:
Code: Select all
test.bas(14) error 10: Expected '=', found '(' in 'bb() = aa()'
test.bas(15) error 72: Array access, index expected, before '=' in 'bb = aa'
Either error points in the wrong direction when trying to fix the problem.
Without knowledge that can only be picked up by extensive reading of the forums, and lots of practical experience looking for problems, a person would never have a hint of the problem.
How can that be corrected in the documents?
And I bow to fxm's greater experience and patience at searching for a solution, but how could anyone else ever arrive at his solution by following the documentation?
** my suggestion **
Perhaps there could be an errata and caveats page that describes the broken functions (like LOCK), the gothcha's (variable names that look like asm register names), and quirks (like extra mandatory () around ... still have no idea when ...) that only years of experience can overcome. Add little snippets that display behavior that is or seems contradictory to the documentation.
Not everyone has the patience to stick around long enough to appreciate FB's power. A few bad experiences - and they are gone. FB *barely* has enough users now to keep it alive for the ages.
david
and maybe this should be moved/split/copied to general discussion