io - How to achieve "unformatted" format specifier in write/read statements? -
i'd able switch between formatted , unformatted output. write , read statements, there no format-specifier unformatted output, far know --- option remove specifier. must use if-statement on every read , write achieve flexibility, or there better way around this?
unformatted , formatted i/o different can have 2 versions of subroutines or 1 big if. if have many read , write statements.
if use c preprocessor, define macro write , use include file avoid code duplication, wouldn't introduce this.
if meant mix formatted , unformatted in single file, use unformatted stream access , store character strings there in "formatted" portions. or close, re-open position="append" , change form=.
Comments
Post a Comment