Algorithms: Algorithm 335: a set of basic input-output procedures
暂无分享,去创建一个
By means of the primitives <italic>insymbol</italic>, <italic>outsymbol</italic> and <italic>length</italic>, as requested by this journal's Algorithms Policy [<italic>Comm. ACM 10</italic> (Nov. 67), 729] a basic set of input-output procedures is defined aiming at quality and flexibility. <italic>outreal</italic>, for instance, is written as a derived procedure; it outputs using the fixed point or the floating point representation, and rounds properly. Variants can easily be written because of the explicit call of the procedures <italic>decompose integer</italic> and <italic>decompose real</italic>. The highly recommended practice of echoing input is made easy with one subset of derived procedures (<italic>ioi</italic>, <italic>ior</italic>, <italic>iob</italic>, <italic>ioa</italic>). The documentation of output in the form of equivalent ALGOL statements is also provided when use is made of the subset <italic>oti, otr, otb, ota</italic>. The Berkeley style of providing information on the form of output using prior calls of procedures such as <italic>real format</italic> is defined. A use of the parameter <italic>out-channel</italic> to provide information for simultaneous output to several channels is suggested. Interrelationship between the declared procedures is furnished in tabular form.
[1] L. Peter Deutsch,et al. Reference manual: QED Time - sharing editor , 1967 .
[2] S. Gorn. Report on Input-Output Procedures for ALGOL 60 , 1964, CACM.