--
--	Inmos Libraries
--	Copyright (C) 1988, 1989, 1990, 1991, 1993  Inmos Limited
--
--	This library is free software; you can redistribute it and/or
--	modify it under the terms of the GNU Lesser 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
--	Lesser General Public License for more details.
--
--	You should have received a copy of the GNU Lesser General Public
--	License along with this library; if not, write to the Free Software
--	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
--

--** @module streamio

#OPTION "E"  -- no compliler libs
#COMMENT "Stream i/o library, V1.1, 13/06/90"
#COMMENT "(c) Copyright INMOS Limited, 1988"
#INCLUDE "streamio.inc"
#USE "convert.lib"
--* Format into ASCII characters and then write to the given screen
-- stream a double precision real number.
--
-- If Ip, Dp and number are such that the resulting formatted form is
-- longer than 30 characters this procedure will act as an invalid
-- process.
--
-- @param scrn for output
-- @param number the IEEE double precision real to format and write out
-- @param Ip, Dp formatting values; see REAL64TOSTRING for their effect
PROC ss.write.real64 (CHAN OF SS scrn, VAL REAL64 number, VAL INT Ip, Dp)
  --{{{  history
  -- Reduced max.number.size from 60 to 30; new version is 1.1 ( old
  -- version was 0.01, 23-Dec-88 ); 13-June-90 SRH
  --}}}

  VAL max.number.size IS 30:
  [max.number.size]BYTE line:
  INT length:
  SEQ
    REAL64TOSTRING (length, line, number, Ip, Dp)
    scrn ! st.out.string; INT32 length :: line
:
