Input/Output in Java and C#

The following specifications are of useful text-oriented I/O classes in Java. Equivalent C# classes appear lower on this page.

OutFile - output in various formats from a general text file
InFile - input in various formats from a general text file
IO - input and output in various formats (StdIn/StdOut files)

  import library;

  public class OutFile {
  // Provide simple facilities for text output
  // P.D. Terry (p.terry@ru.ac.za)

    public static OutFile StdOut = new OutFile();
    public static OutFile StdErr = new OutFile(new PrintWriter(new OutputStreamWriter(System.err), true));

    // Constructors - choice of two

    public OutFile()
    // Creates an OutFile to StdOut

    public OutFile(String fileName)
    // Creates an OutFile to a named disk file (reverts to StdOut if it fails)

    // Error handler

    public boolean openError()
    // Returns true if the open operation on this file failed

    // Output routines (overloaded)

    public void write(String s)
    public void write(object o)
    public void write(byte o)
    public void write(short o)
    public void write(int o)
    public void write(long o)
    public void write(boolean o)
    public void write(float o)
    public void write(double o)
    public void write(char o)
    public void write(char[] o)
    public void write(char[] o, int off, int len)
    // Simple output of the parameter, prefixed by one space if numeric

    public void writeLine()
    public void writeLine(String s)
    public void writeLine(object o)
    public void writeLine(byte o)
    public void writeLine(short o)
    public void writeLine(int o)
    public void writeLine(long o)
    public void writeLine(boolean o)
    public void writeLine(float o)
    public void writeLine(double o)
    public void writeLine(char o)
    public void writeLine(char[] o)
    public void writeLine(char[] o, int off, int len)
    // Simple output of the parameter, prefixed by one space if numeric, followed by linemark

    public void write(String o,      int width)
    public void write(object o,      int width)
    public void write(byte o,        int width)
    public void write(short o,       int width)
    public void write(int o,         int width)
    public void write(long o,        int width)
    public void write(boolean o,     int width)
    public void write(float o,       int width)
    public void write(double o,      int width)
    public void write(char o,        int width)
    // Output of the parameter, in required field width
    // Left justified if width < 0, right justified if width > 0, one leading space if width = 0

    public void writeLine(String o,  int width)
    public void writeLine(object o,  int width)
    public void writeLine(byte o,    int width)
    public void writeLine(short o,   int width)
    public void writeLine(int o,     int width)
    public void writeLine(long o,    int width)
    public void writeLine(boolean o, int width)
    public void writeLine(float o,   int width)
    public void writeLine(double o,  int width)
    public void writeLine(char o,    int width)
    // Output of the parameter, in required field width, followed by linemark
    // Left justified if width < 0, right justified if width > 0, one leading space if width = 0

    public static String FixedRep(double d, int fractionDigits)
    public static String FixedRep(float f, int fractionDigits)
    public static String FloatingRep(double d, int fractionDigits)
    public static String FloatingRep(float f, int fractionDigits)
    // Conversion to string representation with specified number of digits after the point

    public void write(double d, int width, int fractionDigits)
    public void write(float f, int width, int fractionDigits)
    public void writeFixed(double d, int width, int fractionDigits)
    public void writeFixed(float f, int width, int fractionDigits)
    public void writeFloating(double d, int width, int fractionDigits)
    public void writeFloating(float f, int width, int fractionDigits)
    // Output of the value, in required fieldwidth
    // Specified number of digits after the point
    // Left justified if width < 0, right justified if width > 0, one leading space if width = 0

    public void writeLine(float f, int width, int fractionDigits)
    public void writeLine(double d, int width, int fractionDigits)
    public void writeLineFixed(float f, int width, int fractionDigits)
    public void writeLineFixed(double d, int width, int fractionDigits)
    public void writeLineFloating(double d, int width, int fractionDigits)
    public void writeLineFloating(float f, int width, int fractionDigits)
    // Output of the value, in required fieldwidth
    // Specified number of digits after the point
    // Left justified if width < 0, right justified if width > 0, one leading space if width = 0

    public void close()
    // Closes the file

  } // OutFile


public class InFile // Provide simple facilities for text input // P.D. Terry (p.terry@ru.ac.za) public static InFile StdIn = new InFile(); // Constructors - choice of two public InFile() // Creates an InFile attached to StdIn public InFile(String fileName) // Creates an InFile from a named file (reverts to StdIn if it fails) // Error handlers public boolean openError() // Returns true if the open operation on this file failed public int errorCount() // Returns number of errors detected on input public static boolean done() // Simple error checking - reports result for last method called // regardless of which file was accessed public void showErrors() // Allows user to switch error reporting on (off by default) public void hideErrors() // Allows user to switch error reporting off (default setting) // Utility "getters" public boolean eof() // Returns true if the last operation terminated by reaching EOF public boolean eol() // Returns true if the last operation terminated by reaching EOL public boolean error() // Returns true if the last operation on this file failed public boolean noMoreData() // Returns true if the last operation on this file failed because // an attempt was made to read past the end of file public String name() // Returns the file name for the file public char readChar() // Reads and returns a single character public void readAgain() // Allows for a single character probe in code like // do ch = I.readChar(); while(notDigit(ch)); I.readAgain(); ... public void skipSpaces() // Allows for the most elementary of lookahead probes public void readLn() // Consumes all characters to end of line. // String based input public String readString() // Reads and returns a string. Incorporates leading white space, and terminates with a // control character, which is not incorporated or consumed. // Note that this means you might need code like s = I.readString(); I.readLn(); // (Alternatively use readLine() below ) public String readString(int max) // Reads and returns a string. Incorporates leading white space, and terminates with a // control character, which is not incorporated or consumed, or when max // characters have been read (useful for fixed format data). // Note that this means you might need code like s = I.readString(10); I.readLn(); public String readLine() // Reads and returns a string. Incorporates leading white space, and terminates when // EOL or EOF is reached. The EOL character is not incorporated, but is consumed. public String readWord() // Reads and returns a word - a string delimited at either end by a control character or // space (typically the latter). Leading spaces are discarded, and the // terminating character is not consumed // Numeric input routines. These always return, even if the data is incorrect. Users // may probe the status of the operation, or use ShowErrors to get error messages. public int readInt() public int readInt(int radix) // Reads and returns an integer. Leading spaces are discarded. Errors may be reported // or quietly ignored (when 0 is returned) public long readLong() public long readLong(int radix) // Reads and returns a long integer. Leading spaces are discarded. Errors may be reported // or quietly ignored (when 0 is returned) public byte readByte() public byte readByte(int radix) // Reads and returns a byte integer. Leading spaces are discarded. Errors may be reported // or quietly ignored (when 0 is returned) public int readShort() public int readShort(int radix) // Reads and returns a short integer. Leading spaces are discarded. Errors may be reported // or quietly ignored (when 0 is returned) public float readFloat() // Reads and returns a simple float. Leading spaces are discarded. Errors may be reported // or quietly ignored (when 0 is returned) public double readDouble() // Reads and returns a double floating-point number. Leading spaces are discarded. // Errors may be reported or quietly ignored (when 0 is returned) public boolean readBoolean() // Reads a word and returns a boolean, based on the first letter. // Typically the word would be T(rue) or Y(es) or F(alse) or N(o) public void close() // Closes the file } // InFile


class IO { public static int readInt() public static int readInt(String prompt) public static int readInt(int radix) public static int readInt(String prompt, int radix) // Reads a word as a textual representation of an integer and returns the // corresponding value. // Errors may be reported or quietly ignored (when 0 is returned). public static short readShort() public static short readShort(String prompt) public static short readShort(int radix) public static short readShort(String prompt, int radix) // Reads a word as a textual representation of a short integer and returns the // corresponding value. // Errors may be reported or quietly ignored (when 0 is returned). public static long readLong() public static long readLong(String prompt) public static long readLong(int radix) public static long readLong(String prompt, int radix) // Reads a word as a textual representation of a long integer and returns the // corresponding value. // Errors may be reported or quietly ignored (when 0 is returned). public static byte readByte() public static byte readByte(String prompt) public static byte readByte(int radix) public static byte readByte(String prompt, int radix) // Reads a word as a textual representation of a byte integer and returns the // corresponding value. // Errors may be reported or quietly ignored (when 0 is returned). public static boolean readBoolean() public static boolean readBoolean(String prompt) // Reads a word and returns a Boolean value, based on the first letter. // Typically the word would be T(rue) or Y(es) or F(alse) or N(o). public static char readChar() public static char readChar(String prompt) // Reads and returns a single character. public static String readString() public static String readString(String prompt) // Reads and returns a string. Incorporates leading white space, and returns // with a control character, which is not incorporated or consumed. public static String readString(int max) // Reads and returns a string. Incorporates leading white space, and terminates with a // control character, which is not incorporated or consumed, or when max // characters have been read (useful for fixed format data). // Note that this means you might need code like s = I.readString(10); I.readLn(); public static String readLine() public static String readLine(String prompt) // Reads and returns a string. Incorporates leading white space, and returns // when EOL or EOF is reached. The EOL character is not incorporated // but is consumed. public static String readWord() public static String readWord(String prompt) // Reads and returns a word - a string delimited at either end by a control character // or space (typically the latter). Leading spaces are discarded, and the // terminating character is not consumed. public static boolean eof() // Returns true if the last operation terminated by reaching EOL public static boolean eol() // Returns true if the last operation terminated by reaching EOL public static boolean error() // Returns true if the last operation on this file failed public static boolean noMoreData() // Returns true if the last operation on this file failed because // an attempt was made to read past the end of file // Error handlers public static void reportError(string message) // Possible simple error reporting (disabled by default) public static int errorCount() // Returns number of errors detected on input public static boolean done() // Simple error checking - reports result for last method called public static void showErrors() // Allows user to switch error reporting on (off by default) public static void hideErrors() // Allows user to switch error reporting off (default setting) public static void write(String s) public static void write(object o) public static void write(byte o) public static void write(short o) public static void write(int o) public static void write(long o) public static void write(boolean o) public static void write(float o) public static void write(double o) public static void write(char o) public static void write(char[] o) public static void write(char[] o, int off, int len) // Simple output of the parameter, prefixed by one space if numeric public static void writeLine() public static void writeLine(String s) public static void writeLine(object o) public static void writeLine(byte o) public static void writeLine(short o) public static void writeLine(int o) public static void writeLine(long o) public static void writeLine(boolean o) public static void writeLine(float o) public static void writeLine(double o) public static void writeLine(char o) public static void writeLine(char[] o) public static void writeLine(char[] o, int off, int len) // Simple output of the parameter, prefixed by one space if numeric, followed by linemark public static void write(String o, int width) public static void write(object o, int width) public static void write(byte o, int width) public static void write(short o, int width) public static void write(int o, int width) public static void write(long o, int width) public static void write(boolean o, int width) public static void write(float o, int width) public static void write(double o, int width) public static void write(char o, int width) // Output of the parameter, in required field width // Left justified if width < 0, right justified if width > 0, one leading space if width = 0 public static void writeLine(String o, int width) public static void writeLine(object o, int width) public static void writeLine(byte o, int width) public static void writeLine(short o, int width) public static void writeLine(int o, int width) public static void writeLine(long o, int width) public static void writeLine(boolean o, int width) public static void writeLine(float o, int width) public static void writeLine(double o, int width) public static void writeLine(char o, int width) // Output of the parameter, in required field width, followed by line mark // Left justified if width < 0, right justified if width > 0, one leading space if width = 0 public static String FixedRep(double d, int fractionDigits) public static String FixedRep(float f, int fractionDigits) public static String FloatingRep(double d, int fractionDigits) public static String FloatingRep(float f, int fractionDigits) // Conversion to string representation with specified number of digits after the point public static void write(double d, int width, int fractionDigits) public static void write(float f, int width, int fractionDigits) public static void writeFixed(double d, int width, int fractionDigits) public static void writeFixed(float f, int width, int fractionDigits) public static void writeFloating(double d, int width, int fractionDigits) public static void writeFloating(float f, int width, int fractionDigits) // Output of the value, in required fieldwidth // Specified number of digits after the point // Left justified if width < 0, right justified if width > 0, one leading space if width = 0 public static void writeLine(float f, int width, int fractionDigits) public static void writeLine(double d, int width, int fractionDigits) public static void writeLineFixed(float f, int width, int fractionDigits) public static void writeLineFixed(double d, int width, int fractionDigits) public static void writeLineFloating(double d, int width, int fractionDigits) public static void writeLineFloating(float f, int width, int fractionDigits) // Output of the value, in required fieldwidth // Specified number of digits after the point // Left justified if width < 0, right justified if width > 0, one leading space if width = 0 }


The following specifications are of useful text-oriented I/O classes in C#. Equivalent Java classes appear higher on this page.

OutFile - output in various formats from a general text file
InFile - input in various formats from a general text file
IO - input and output in various formats (StdIn/StdOut files)

  using Library;

  public class OutFile {
  // Provide simple facilities for text output
  // P.D. Terry (p.terry@ru.ac.za)

    public static OutFile StdOut = new OutFile(Console.Out);
    public static OutFile StdErr = new OutFile(Console.Error);

    // Constructors - choice of two

    public OutFile()
    // Creates an OutFile to StdOut

    public OutFile(string fileName)
    // Creates an OutFile to a named disk file (reverts to StdOut if it fails)

    // Error handler

    public bool OpenError()
    // Returns true if the open operation on this file failed

    // Output routines (overloaded)

    public void Write(string s)
    public void Write(object o)
    public void Write(byte o)
    public void Write(short o)
    public void Write(int o)
    public void Write(long o)
    public void Write(bool o)
    public void Write(float o)
    public void Write(double o)
    public void Write(char o)
    public void Write(char[] o)
    public void Write(char[] o, int off, int len)
    // Simple output of the parameter, prefixed by one space if numeric

    public void WriteLine()
    public void WriteLine(string s)
    public void WriteLine(object o)
    public void WriteLine(byte o)
    public void WriteLine(short o)
    public void WriteLine(int o)
    public void WriteLine(long o)
    public void WriteLine(bool o)
    public void WriteLine(float o)
    public void WriteLine(double o)
    public void WriteLine(char o)
    public void WriteLine(char[] o)
    public void WriteLine(char[] o, int off, int len)
    // Simple output of the parameter, prefixed by one space if numeric, followed by linemark

    public void Write(string o,      int width)
    public void Write(object o,      int width)
    public void Write(byte o,        int width)
    public void Write(short o,       int width)
    public void Write(int o,         int width)
    public void Write(long o,        int width)
    public void Write(bool o,        int width)
    public void Write(float o,       int width)
    public void Write(double o,      int width)
    public void Write(char o,        int width)
    // Output of the parameter, in required field width
    // Left justified if width < 0, right justified if width > 0, one leading space if width = 0

    public void WriteLine(string o,  int width)
    public void WriteLine(object o,  int width)
    public void WriteLine(byte o,    int width)
    public void WriteLine(short o,   int width)
    public void WriteLine(int o,     int width)
    public void WriteLine(long o,    int width)
    public void WriteLine(bool o,    int width)
    public void WriteLine(float o,   int width)
    public void WriteLine(double o,  int width)
    public void WriteLine(char o,    int width)
    // Output of the parameter, in required field width, followed by linemark
    // Left justified if width < 0, right justified if width > 0, one leading space if width = 0

    public static string FixedRep(double d, int fractionDigits)
    public static string FixedRep(float f, int fractionDigits)
    public static string FloatingRep(double d, int fractionDigits)
    public static string FloatingRep(float f, int fractionDigits)
    // Conversion to string representation with specified number of digits after the point

    public void Write(double d, int width, int fractionDigits)
    public void Write(float f, int width, int fractionDigits)
    public void WriteFixed(double d, int width, int fractionDigits)
    public void WriteFixed(float f, int width, int fractionDigits)
    public void WriteFloating(double d, int width, int fractionDigits)
    public void WriteFloating(float f, int width, int fractionDigits)
    // Output of the value, in required fieldwidth
    // Specified number of digits after the point
    // Left justified if width < 0, right justified if width > 0, one leading space if width = 0

    public void WriteLine(float f, int width, int fractionDigits)
    public void WriteLine(double d, int width, int fractionDigits)
    public void WriteLineFixed(float f, int width, int fractionDigits)
    public void WriteLineFixed(double d, int width, int fractionDigits)
    public void WriteLineFloating(double d, int width, int fractionDigits)
    public void WriteLineFloating(float f, int width, int fractionDigits)
    // Output of the value, in required fieldwidth
    // Specified number of digits after the point
    // Left justified if width < 0, right justified if width > 0, one leading space if width = 0

    public void Close()
    // Closes the file

  } // OutFile


public class InFile // Provide simple facilities for text input // P.D. Terry (p.terry@ru.ac.za) public static InFile StdIn = new InFile(Console.In); // Constructors - choice of two public InFile() // Creates an InFile attached to StdIn public InFile(string fileName) // Creates an InFile from a named file (reverts to StdIn if it fails) // Error handlers public bool OpenError() // Returns true if the open operation on this file failed public int ErrorCount() // Returns number of errors detected on input public static bool Done() // Simple error checking - reports result for last method called // regardless of which file was accessed public void ShowErrors() // Allows user to switch error reporting on (off by default) public void HideErrors() // Allows user to switch error reporting off (default setting) // Utility "getters" public bool EOF() // Returns true if the last operation terminated by reaching EOF public bool EOL() // Returns true if the last operation terminated by reaching EOL public bool Error() // Returns true if the last operation on this file failed public bool NoMoreData() // Returns true if the last operation on this file failed because // an attempt was made to read past the end of file public string Name() // Returns the file name for the file public char ReadChar() // Reads and returns a single character public void ReadAgain() // Allows for a single character probe in code like // do ch = I.ReadChar(); while(notDigit(ch)); I.ReadAgain(); ... public void SkipSpaces() // Allows for the most elementary of lookahead probes public void ReadLn() // Consumes all characters to end of line. // String based input public string ReadString() // Reads and returns a string. Incorporates leading white space, and terminates with a // control character, which is not incorporated or consumed. // Note that this means you might need code like s = I.ReadString(); I.ReadLn(); // (Alternatively use ReadLine() below ) public string ReadString(int max) // Reads and returns a string. Incorporates leading white space, and terminates with a // control character, which is not incorporated or consumed, or when max // characters have been read (useful for fixed format data). // Note that this means you might need code like s = I.ReadString(10); I.ReadLn(); public string ReadLine() // Reads and returns a string. Incorporates leading white space, and terminates when // EOL or EOF is reached. The EOL character is not incorporated, but is consumed. public string ReadWord() // Reads and returns a word - a string delimited at either end by a control character or // space (typically the latter). Leading spaces are discarded, and the // terminating character is not consumed // Numeric input routines. These always return, even if the data is incorrect. Users // may probe the status of the operation, or use ShowErrors to get error messages. public int ReadInt() public int ReadInt(int radix) // Reads and returns an integer. Leading spaces are discarded. Errors may be reported // or quietly ignored (when 0 is returned) public long ReadLong() public long ReadLong(int radix) // Reads and returns a long integer. Leading spaces are discarded. Errors may be reported // or quietly ignored (when 0 is returned) public int ReadShort() public int ReadShort(int radix) // Reads and returns a short integer. Leading spaces are discarded. Errors may be reported // or quietly ignored (when 0 is returned) public float ReadFloat() // Reads and returns a simple float. Leading spaces are discarded. Errors may be reported // or quietly ignored (when 0 is returned) public double ReadDouble() // Reads and returns a double floating-point number. Leading spaces are discarded. // Errors may be reported or quietly ignored (when 0 is returned) public bool ReadBool() // Reads a word and returns a boolean, based on the first letter. // Typically the word would be T(rue) or Y(es) or F(alse) or N(o) public void Close() // Closes the file } // InFile


class IO { public static int ReadInt() public static int ReadInt(string prompt) public static int ReadInt(int radix) public static int ReadInt(string prompt, int radix) // Reads a word as a textual representation of an integer and returns the // corresponding value. // Errors may be reported or quietly ignored (when 0 is returned). public static short ReadShort() public static short ReadShort(string prompt) public static short ReadShort(int radix) public static short ReadShort(string prompt, int radix) // Reads a word as a textual representation of a short integer and returns the // corresponding value. // Errors may be reported or quietly ignored (when 0 is returned). public static long ReadLong() public static long ReadLong(string prompt) public static long ReadLong(int radix) public static long ReadLong(string prompt, int radix) // Reads a word as a textual representation of a long integer and returns the // corresponding value. // Errors may be reported or quietly ignored (when 0 is returned). public static byte ReadByte() public static byte ReadByte(string prompt) public static byte ReadByte(int radix) public static byte ReadByte(string prompt, int radix) // Reads a word as a textual representation of a byte and returns the // corresponding value. // Errors may be reported or quietly ignored (when 0 is returned). public static bool ReadBool() public static bool ReadBool(string prompt) // Reads a word and returns a Boolean value, based on the first letter. // Typically the word would be T(rue) or Y(es) or F(alse) or N(o). public static char ReadChar() public static char ReadChar(string prompt) // Reads and returns a single character. public static string ReadString() public static string ReadString(string prompt) // Reads and returns a string. Incorporates leading white space, and returns // with a control character, which is not incorporated or consumed. public static string ReadLine() public static string ReadLine(prompt) // Reads and returns a string. Incorporates leading white space, and returns // when EOL or EOF is reached. The EOL character is not incorporated // but is consumed. public static string ReadWord() public static string ReadWord(string prompt) // Reads and returns a word - a string delimited at either end by a control character // or space (typically the latter). Leading spaces are discarded, and the // terminating character is not consumed. public static bool EOF() // Returns true if the last operation terminated by reaching EOL public static bool EOL() // Returns true if the last operation terminated by reaching EOL public static bool Error() // Returns true if the last operation on this file failed public static bool NoMoreData() // Returns true if the last operation on this file failed because // an attempt was made to read past the end of file // Error handlers public static void ReportError(string message) // Possible simple error reporting (disabled by default) public static int ErrorCount() // Returns number of errors detected on input public static bool Done() // Simple error checking - reports result for last method called public static void ShowErrors() // Allows user to switch error reporting on (off by default) public static void HideErrors() // Allows user to switch error reporting off (default setting) public static void Write(string s) public static void Write(object o) public static void Write(byte o) public static void Write(short o) public static void Write(int o) public static void Write(long o) public static void Write(boolean o) public static void Write(float o) public static void Write(double o) public static void Write(char o) public static void Write(char[] o) public static void Write(char[] o, int off, int len) // Simple output of the parameter, prefixed by one space if numeric public static void WriteLine() public static void WriteLine(string s) public static void WriteLine(object o) public static void WriteLine(byte o) public static void WriteLine(short o) public static void WriteLine(int o) public static void WriteLine(long o) public static void WriteLine(boolean o) public static void WriteLine(float o) public static void WriteLine(double o) public static void WriteLine(char o) public static void WriteLine(char[] o) public static void WriteLine(char[] o, int off, int len) // Simple output of the parameter, prefixed by one space if numeric, followed by linemark public static void Write(string o, int width) public static void Write(object o, int width) public static void Write(byte o, int width) public static void Write(short o, int width) public static void Write(int o, int width) public static void Write(long o, int width) public static void Write(boolean o, int width) public static void Write(float o, int width) public static void Write(double o, int width) public static void Write(char o, int width) // Output of the parameter, in required field width // Left justified if width < 0, right justified if width > 0, one leading space if width = 0 public static void WriteLine(string o, int width) public static void WriteLine(object o, int width) public static void WriteLine(byte o, int width) public static void WriteLine(short o, int width) public static void WriteLine(int o, int width) public static void WriteLine(long o, int width) public static void WriteLine(boolean o, int width) public static void WriteLine(float o, int width) public static void WriteLine(double o, int width) public static void WriteLine(char o, int width) // Output of the parameter, in required field width, followed by line mark // Left justified if width < 0, right justified if width > 0, one leading space if width = 0 public static string FixedRep(double d, int fractionDigits) public static string FixedRep(float f, int fractionDigits) public static string FloatingRep(double d, int fractionDigits) public static string FloatingRep(float f, int fractionDigits) // Conversion to string representation with specified number of digits after the point public static void Write(double d, int width, int fractionDigits) public static void Write(float f, int width, int fractionDigits) public static void WriteFixed(double d, int width, int fractionDigits) public static void WriteFixed(float f, int width, int fractionDigits) public static void WriteFloating(double d, int width, int fractionDigits) public static void WriteFloating(float f, int width, int fractionDigits) // Output of the value, in required fieldwidth // Specified number of digits after the point // Left justified if width < 0, right justified if width > 0, one leading space if width = 0 public static void WriteLine(float f, int width, int fractionDigits) public static void WriteLine(double d, int width, int fractionDigits) public static void WriteLineFixed(float f, int width, int fractionDigits) public static void WriteLineFixed(double d, int width, int fractionDigits) public static void WriteLineFloating(double d, int width, int fractionDigits) public static void WriteLineFloating(float f, int width, int fractionDigits) // Output of the value, in required fieldwidth // Specified number of digits after the point // Left justified if width < 0, right justified if width > 0, one leading space if width = 0 }


Modified: 2010/08/05