This compatibility module just defines the diskdata procedure required to use data files formatted for mp-model from Mosel and provides a commercial discounting function. To use this module, the following line must be included in the header of the Mosel model file:uses 'mmetc'
Procedures and functions
disc Annual discount. diskdata Read in or write an array or set of strings to a file.
This module provides the diskdata IO driver designed to be used as an interface for initializations blocks for both reading and writing files formated for the diskdata procedure.
The driver can only be used in `initializations' blocks. In the opening part of the block, no file name has to be provided, but general options can be stated at this point: they will be applied to all labels. In the block, each label entry is understood as the file name to use for the actual processing. Note that, before the file name, one can add further options separated by comas, that are effective to the particular entry. The file name given can use extended notation.
The diskdata driver takes the following options:
- dense data format
- sparse data format
- strings quoted with single quotes
- strings are not quoted in the file
- append output to the end of an existing file
- tables are transposed
- skip zero values
Example:declarations Set1: set of string ! Declare a set of strings ar1,ar2: array(Set1,range) of real ! Declare two dynamic arrays r: real ! Declare a real value end-declarations initializations from "diskdata:" ! Use 'diskdata' format for reading ar1 as "sparse,ind.dat" ! Read `ar1' from 'in.dat' in sparse format r as "r_init.dat" ! Initialize `r' from 'r_init.dat' end-initializations initializations to "diskdata:append" ! Use 'diskdata' format for output [ar1, ar2] as "out.dat" ! Save two arrays in sparse format Set1 as "out.dat" ! Save set `Set1' to the same file end-initializations
If you have any comments or suggestions about these pages, please send mail to firstname.lastname@example.org.
© Copyright 2001-2013 Fair Isaac Corporation. All rights reserved.