No. When something fails, it goes straight to the end of the function to unload anything. If it didn't, it would continue trying to load stuff after it, which is pointless as the function cannot now proceed. The unload code is
supposed to execute 100% of the time, so that even if the function fails at some point it can free any resources it allocated without having to add code to do so at every operation.
See this more practical example:
function DoSomething()
success as boolean
success = 0
` Load first file
file1 = LoadFile("1.txt", 1)
if not file1
goto unload
endif
` Load second file
file2 = LoadFile("2.txt", 2)
if not file2
goto unload
endif
` Do whatever with the open files
...
success = 1
unload:
` Unload anything here that was loaded
if file1 then close file 1
if file2 then close file 2
endfunction success
function LoadFile(filename as string, num as integer)
if not file exist(filename) then exitfunction 0
open to read filename, num
endfunction num
Note that the second operation doesn't have to be loading another file (don't start thinking about using a loop for it), it can be any other kind of operation.