I couldn't remember, but checked - I am replacing ' with _ in the actual code https://github.com/mapmeld/fortran-machine/blob/master/marsu...
Generally, it is recommended that you create a prepared statement entirely from static SQL string(s) (no user input) and then bind parameters into it, such that there is no possibility for any user input to be parsed as SQL: