exactnum.sa


Generated by gen_html_sa_files from ICSI. Contact gomes@icsi.berkeley.edu for details
 
------------------------->  GNU Sather - sourcefile  <-------------------------
-- Copyright (C) 2000 by K Hopper, University of Waikato, New Zealand        --
-- This file is part of the GNU Sather library. It is free software; you may --
-- redistribute  and/or modify it under the terms of the GNU Library General --
-- Public  License (LGPL)  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 Doc/LGPL for more details.       --
-- The license text is also available from:  Free Software Foundation, Inc., --
-- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA                     --
-------------->  Please email comments to <bug-sather@gnu.org>  <--------------


abstract class $EXACT_FMT < $FMT

abstract class $EXACT_FMT < $FMT is -- This class models the notion of a numeric value which requires -- rendering as an exact number (no decimal places and no exponent. -- Version 1.0 Feb 99. Copyright K Hopper, U of Waikato -- Development History -- ------------------- -- Date Who By Detail -- ---- ------ ------ -- 11 Feb 99 kh Original after FMT/DESCR confusion fmt( descr : EXACT_DESCR, lib : LIBCHARS ) : STR ; -- This routine formats exact (numeric) formatting types using the given -- repertoire and encoding. fmt( descr : EXACT_DESCR ) : STR ; -- This routine formats exact (numeric) formatting types using a default -- repertoire and encoding. end ; -- $EXACT_FMT

abstract class $EXACT_DESCR < $VAL_DESCR

abstract class $EXACT_DESCR < $VAL_DESCR is -- This class models the notion of the description values which are -- needed when rendering an exact number. -- Version 1.0 Sep 98. Copyright K Hopper, U of Waikato -- Development History -- ------------------- -- Date Who By Detail -- ---- ------ ------ -- 7 Sep 98 kh Original after Modula-2 library. filler : CHAR_CODE ; whole_digits : CARD ; width : CARD ; val_sign : BOOL ; end ; -- $EXACT_DESCR

class EXACT_DESCR < $EXACT_DESCR

class EXACT_DESCR < $EXACT_DESCR is -- Ths claaa implements the description of the way in which a rendering engine is to render an exact number. -- Version 1.0 Sep 98. Copyright K Hopper, U of Waikato -- Development History -- ------------------- -- Date Who By Detail -- ---- ------ ------ -- 7 Sep 98 kh Original after Modula-2 library. readonly attr filler : CHAR_CODE ; readonly attr whole_digits : CARD ; readonly attr width : CARD ; readonly attr val_sign : BOOL ; create( fill : CHAR_CODE, whole : CARD, val_force : BOOL ) : SAME is -- This is the single routine in this class. It returns a newly created -- object for use when formatting. me : SAME := new ; me.filler := fill ; me.whole_digits := whole ; me.width := whole ; if val_force then -- allow for mandatory sign! me.width := me.width + 1 end ; me.val_sign := val_force ; return me end ; end ; -- EXACT_DESCR