User defined data formats
Mosel also provides functions which allow you to read data in from and write data out to text files using any format (see list in Section Built in functions and procedures).
- Reading in free format data
-
declarations ii, jj: integer ! Don't use normal i,j end-declarations fopen('cost.dat', F_INPUT) while(not iseof) readln(ii, ',', jj, ',', COST(ii,jj)) fclose(F_INPUT)
- Writing out data in user format
-
fopen('xsol.dat', F_OUTPUT) forall(s in SUP, d in DEP) writeln(s, ',', d, ',', getsol(x(s,d))) fclose(F_OUTPUT)
© 2001-2020 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.