Structure prototypes in Structure DIMs
Posted: Tue 12 Feb 2019, 22:27
In an other topic I recently wrote:
and as I did this thought 'Why can't I define a Rect structure prototype and use that?' But I did not see how you could do that until I recently looked at one of Richard's SDL libraries where I found the equivalent to this.
Which seems so obvious in retrospect, but isn't in the manual. So I thought I would pass it along in case it is of interest to others.
Of course, I might have been the only one who had not cottoned on to this technique to start with!
Z
Code: Select all
DIM mi{s%, rm{l%,t%,r%,b%}, rw{l%,t%,r%,b%}, flag%}
Code: Select all
DIM rect{l%,t%,r%,b%}
DIM mi{s%, rm{}=rect{}, rw{}=rect{}, flag%}
Of course, I might have been the only one who had not cottoned on to this technique to start with!
Z