The provisions of RSA 625 through 629 are applicable to offenses defined outside this code unless the code otherwise provides.