home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / TURBOPAS / TPPROC19.ZIP / DOLLARST.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1985-09-06  |  896 b   |  26 lines

  1. Program DollarST_Demo;
  2. {This program demonstrates the use of the procedure
  3.       DollarString.
  4.       DollarString is a
  5.       turbo pascal function which formats a real variable
  6.       as a string with imbedded commas separating thousands
  7.       millions etc.  Negative numbers are surrounded with
  8.       parenthesis, as per the accounting notation.
  9.  
  10.       Author:  Charles L. Jackson
  11.                3 Feb 1985
  12.                Suite 450
  13.                1990 M St Washington D.C.  20036}
  14.  
  15.  
  16. {$IDollarSt.inc}
  17.  
  18. begin
  19.   writeln(Dollarstring(12345.67,2));
  20.   writeln(Dollarstring(12345.67,2):10);
  21.   writeln(Dollarstring(12345.67,2):20);
  22.   writeln(Dollarstring(12345.67,1));
  23.   writeln(Dollarstring(-12345.67,2));
  24.    {here is how to get a dollarsign}
  25.   writeln('$'+Dollarstring(12345.67,2));
  26. end.