This only happens to me on Windows 7. For the long explanation, see here:
http://forum.thegamecreators.com/?m=forum_view&t=180127&b=1&p=0
This snippet attempts to recreate the conditions related to the thread I posted above. The difference is that while this code will run, upon hitting a key it will crash when attempting to end the application. It's one of those generic errors, "DarkBASIC Pro Project has stopped working".
t$ = thing$("test")
print "> "+t$
wait key
end
function thing$(r$)
e$ = ""
exitfunction ""
endfunction r$
Now, making the simple change to return a string variable containing the empty string instead and the program will run and exit smoothly.
t$ = thing$("test")
print "> "+t$
wait key
end
function thing$(r$)
e$ = ""
exitfunction e$
endfunction r$
Additional note, it seems this happens if I return any string, not just an empty string. Storing the string into a variable first then returning it works fine.
"Only the educated are free" ~Epictetus
"Imagination is more important than knowledge..." ~Einstein