08-16-2024, 10:41 PM
(08-16-2024, 10:19 PM)Pete Wrote: Good that it works that way!
So I would place it in the main, but would this work with INCLUDE files?
MAIN
Code: (Select All)DIM SHARED ColorDepthError AS INTEGER
'$INCLUDE:'.\lib\image\lib_img_colordepth.bi' IMG_ColorDepth function
Image& = _NEWIMAGE(640, 480, 32) ' valid image
PRINT IMG_ColorDepth(Image&) ' valid image
PRINT IMG_ColorDepth(-30) ' invalid image
'$INCLUDE:'.\lib\image\lib_img_colordepth.bm' IMG_ColorDepth function
END
COLORDEPTH_BIFILE:
ColorDepthError = ERR
RESUME NEXT
I don't think so. You've got code and labels AFTER your subs, which QB64 doesn't like.
Code: (Select All)
DIM SHARED ColorDepthError AS INTEGER
'$INCLUDE:'.\lib\image\lib_img_colordepth.bi' IMG_ColorDepth function
Image& = _NEWIMAGE(640, 480, 32) ' valid image
PRINT IMG_ColorDepth(Image&) ' valid image
PRINT IMG_ColorDepth(-30) ' invalid image
COLORDEPTH_BIFILE:
ColorDepthError = ERR
RESUME NEXT
'$INCLUDE:'.\lib\image\lib_img_colordepth.bm' IMG_ColorDepth function
END
The above should work though, I'd think without any issue.