i am writting the gaem battleship and i was wondering how to write a section of code so that if you type the word 'quit' in the command window it terminates the whole program no matter what stage it is at,
i have tried this -
if quit
disp ('end game')
end
but it does not work and is showing errors when i try ot use it