Video Tutorial #4 is now being uploaded into YouTube at:
This video now covers both REDIM _PRESERVE and mulit-dimensional offsets for use with _MEM, and like the last one, it comes in at about an hour and a half total view time. I know these are rather longish view times, but I'm afraid that's just how long it takes for me to ramble and feel like I've properly covered the subject and illustrated the concepts involved in them. For folks who just want the basic "Cliff Note" version of things, what you'll want to take home at the end of the day is these simple concepts:
'FINAL RULE:
'**ONLY** redim the right-most index when using REDIM _PRESERVE!!
'IF you need to redim **ANY** other index; you'll have to do it manually!!
FUNCTION Offset& (x, y)
xsize = UBOUND(A, 1) - LBOUND(A, 1) + 1 'the number of elements in X
Offset& = (y * xsize + x) 'Y * number of elements in X + X
END FUNCTION
FUNCTION ScreenOffset& (x, y)
ScreenOffset& = (y * _WIDTH + x)
END FUNCTION
To understand WHY those are the important keynotes to remember and use, WATCH the video. If you're not interested in WHY, then just remember and use those as they're presented and know, "that's just the way it is". Either way, I hope what's here will help somebody, somewhere, understand and develop better habits to work with memory more efficiently in the future.
Future videos will be:
Covering the power of M.TYPE
Covering some of the other mem commands such as _MEMFILL and _MEMCOPY
Optimizing code to work more efficiently with _MEM, to make the most of its power
Maybe one of how I wish the makes of Reese's Pieces would go to Hell. We have Halloween candy left over, and their damn wrappings are the type which I can't open EVEN WITH A KNIFE!! I've never seen such a stupidly packaged product in all my life! GRRRR!! *Somebody* needs to do a video on how stupid the things are!
But, until then: Enjoy guys!
Note: Video is currently in processing with Youtube as still has an estimated 9 minutes left before it's available to view. This is a HELLUVA difference from the 8-12 hours which I was faced with, with the last video (which was a comparable size and resolution). My upload speed has went from 0.78MBS to almost 100MBS max speed. (This comes in as a 1.8GB video, so you can see how big of a difference that makes for me!)
Once again, grab the popcorn, have a seat, and listen to me ramble. Watch as I baffle myself and wonder just where the BLEEP I screwed up once more, with the most basic of illustrationing... And hopefully, at the end of the day, you'll end up understanding things more than I ended up confusing things...
All feedback, questions, and other such things are more than welcome below, or via personal email at: smcneill@swva.net (or the email button on the left of this post area).