|
-
Oct 20th, 2017, 02:54 PM
#10
Re: Timed events handler (frame rate control for games etc.)
To any interested. By using a separate variable, it is very useful when the array may be buffered, i.e., larger than needed. The counter variable can be used to indicate how many array elements are actually used. The difference between the UBound and the counter is the buffer. Of course, if the counter value is zero, then this can be confusing: is it zero because array wasn't initialized or is it zero because the array is sized (all buffered), but no elements are in use. In that scenario, best to erase the array when counter reaches zero so there is no confusion.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|