I don't know if a number reference is necessarily a good idea. Imagine your code used in a set of $INCLUDE files... Is ImageB.png the 2nd file, or the 22nd?
Personally, I like an idea similar to this:
$RESOURCE:ImageB.PNG, 123456
First value is the resource name which we want to reference it by.
The number value sets a hard limit for the max size of the resource, which we can then manually
copy/paste here, or get the IDE to load from file with a simple Load Resource option in the menu.
NO ERROR CHECKING/SYNTAX CORRECTION OCCURS HERE.
It'd be nice if this was a collapsible mid section, for ease of code navigation...
$END RESOURCES
Then you can use "$RESOURCE:name" for any file operation. (Even OUTPUT/PUT could be supported as long as space was reserved first.)l
handle = _LOADIMAGE("$RESOURCE:ImageB.PNG",32)
font = _LOADFONT("$RESOURCE:InternalFont2.TTF", 16, "MONOSPACE")
OPEN "$RESOURCE:OwnerData.txt" FOR OUTPUT AS #1
And such...