Mike Yearwood
Toronto, Ontario, Canada
General information
Category:
Coding, syntax & commands
Mike,
>It would be fantastic to have some better kind of pre-processor.
Yeah - especially as vfp function overhead is gigantic compared to machine-code compiled languages.
>FieldNumInAlias should just return the field number. I've taken to generating an error when the passed alias doesn't exist.
In most cases an error from the issue will be coming IAC - I sprinkle asserts all over the code but stopped generating special errors. This may be an overreaction to working on a team where they tried to anticipate *every* error and generate handled errors with a nice descriptive text. They did not get much real work done...
>I ask you to consider that if you needed to check for a field's existence and act on that in some way, you would be better off having a IsFieldInAlias because calling FieldNumInAlias would take longer and do things not required by the need.
No argument from me - the base implementation came from Russell. See my answer there
>Having both let's programmers decide which function to call as appropriate.
As these are "near-system-level" I totally agree. Having a function do more than one thing should be an exeption with clear reasons why this path was taken.
regards
thomas
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only