if the image doesn't exits .
this command wouldn't have much effect if your game doesn't require loading too many images. however, some apps require loading large amount of images which make duplication possible. so, using this command helps in not allowing loading image more than once or deleting non existing image.
function load_or_delete_image(imagefilename$,imgno,status$)
select status$
case "load" : if getimageexists(imgno)=0 : loadimage(imagefilename$) : endif : endcase
case "delete" : if getimageexists(imgno)=1 : deleteimage(imagefilename$) : endif : endcase
endfunction