When executed within a called script, exit and quit commands do not return control to caller if executed within a compound if-statement. When executed from a non-compound if-statement, control is returned as expected.
Stated differently, when exit/quit is executed within a compound if-statement, it is treated as a C/C++-style break rather than a return.
Sample script attached.
Using OpenSUSE 12.2 (32-bit), gnuplot v4.6, patchlevel 0.