-- Rational_IO spec -- --Copyright (C) 1996 Free Software Foundation --written by Jon Squire with assistance from many others -- --This file is part of the numerics library. This library --is free software; you can redistribute it and/or modify it under the --terms of the GNU Library General Public License as published by the Free --Software Foundation; either version 2 of the License, or (at your --option) any later version. This library is distributed in the hope --that it will be useful, but WITHOUT ANY WARRANTY; without even the --implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR --PURPOSE. See the GNU Library General Public License for more details. --You should have received a copy of the GNU Library General Public --License along with this library; if not, write to the Free Software --Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. with RATIONAL_TYPES; use RATIONAL_TYPES; with TEXT_IO; use TEXT_IO; package RATIONAL_IO is DEFAULT_WIDTH : FIELD := 0; -- variable, no fixed maximum DEFAULT_BASE : NUMBER_BASE := 10; -- only base supproted os of now procedure GET (FILE : in FILE_TYPE; ITEM : out RATIONAL; WIDTH : in FIELD := 0); procedure GET (ITEM : out RATIONAL; WIDTH : in FIELD := 0); procedure PUT (FILE : in FILE_TYPE; ITEM : in RATIONAL; WIDTH : in FIELD := DEFAULT_WIDTH; BASE : in NUMBER_BASE := DEFAULT_BASE); procedure PUT (ITEM : in RATIONAL; WIDTH : in FIELD := DEFAULT_WIDTH; BASE : in NUMBER_BASE := DEFAULT_BASE); procedure GET (FROM : in STRING; ITEM : out RATIONAL; LAST : out POSITIVE); procedure PUT (TO : out STRING; ITEM : in RATIONAL; BASE : in NUMBER_BASE := DEFAULT_BASE); end RATIONAL_IO;