sizeof
calculations) should never appear in open code; Taligent engineers must talk to an architect first. If you feel that you must do it, here are some guidelines to follow:
Don't do it! Don't try to save time by shortcutting the compiler because you know what it will do and you know a faster trick. When the compiler changes, the assumptions change, or if you get it wrong, you're going to be in hot water.
Use a collection class. The Taligent Collection classes already handle many kinds of storage manipulation including variable length arrays. The primitive forms of the Collection classes are extremely efficient. As an added bonus, the code is shared.
Wrap it in a class. Determine the basic abstraction that requires storage manipulation, and wrap it. That way, you only have to write the storage manipulation code once instead of spreading it throughout your code.
[Contents]
[Previous]
[Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Generated with WebMaker