-- (C) Copyright International Business Machines Corporation 23 January 
-- 1990.  All Rights Reserved. 
--  
-- See the file USERAGREEMENT distributed with this software for full 
-- terms and conditions of use. 
-- File: string.d
-- Author: David Bacon
-- SCCS Info: @(#)string.d	1.3 3/13/90

string: using () definitions
    
    int2string: callmessage (
	int: integer,
	string: charstring
      )
    constant (int)
    exit { full };
    
    int2stringQ: inport of int2string { init(int) };
    int2stringFn: outport of int2stringQ;
    
    
    string2int: callmessage (
	string: charstring,
	int: integer
      )
    constant (string)
    exit { full }
    exception badFormat { init(string) };
    
    string2intQ: inport of string2int { init(string) };
    string2intFn: outport of string2intQ;
    
    
    justify: callmessage (
	inString: charstring,	-- string to justify
	size: integer,		-- size of field (negative means left justify)
	outString: charstring	-- justified string
      )
    constant (inString, size)
    exit { full };
    
    justifyQ: inport of justify { init(inString), init(size) };
    justifyFn: outport of justifyQ;

  end definitions

