A witness in a criminal case may be cross-examined as to previous statements made by him in writing or reduced into writing, relative to the subject matter of the proceeding, without such writing being shown to him; but if it is intended to contradict such witness by the writing, his attention must, before such contradictory proof can be given, be called to the particular occasion on which the writing is supposed to have been made, and he may be asked if he did not make a writing of the purport of the one to be offered to contradict him, and if he denies making it, or does not admit its execution, it shall then be shown to him, and if he admits its genuineness, he shall be allowed to make his own explanation of it; but it shall be competent for the court at any time during the trial to require the production of the writing for its inspection, and the court may thereupon make such use of it for the purpose of the trial as it may think best.
Code 1950, § 8-293; 1958, c. 380; 1960, c. 114; 1964, c. 356; 1977, c. 624.