Program Design for Tax Rules:

OTS programs read values from your input file into it's L[] tax-form-line variables, then adds or subtracts the items according to the tax-rules, and prints the results. To do this efficiently, several convenience functions have been provided, such as GetLine and ShowLine. GetLine checks for the named line number, and adds up any contributing entries, while parsing and ignoring any comments. ShowLine prints the resulting line value in a convenient format after the line number or name. The are several variants of the convenience routines. GetLineF is a combination of GetLine and ShowLine. It gets the line data, and prints it to the output file.

Example OTS Program Code:

 GetLine( "L7", &L[7] );	/* Expect label "L7", and read value(s) into variable L[7]. */
 ShowLine(7);			/* Print the value of L[7] to output. */
 GetLine( "L9", &L[9] );
 L[12] = L[7] + L[9];		/* Perform a calculation. */
 GetLine( "L15", &L[15] );
 if (L[15] > L[12])
  L[16] = L[15] - L[12];
  L[16] = 0.0;

Capital Gains/Losses are Recorded as:

	buy_cost	date
	sale_value	date
Buy cost is negative; it is a cost; an outlay. Date is xx-yy-zz, where xx is the two-digit month, yy is the day, and zz is the last two digits of the year. (Yes, this is Y2K proof.)

Example Data File Entries:

        -3658.22        12-15-99        { 100 Shares XOM }
         4209.95         1-25-02
The dates are required to apply the proper short-term or long-term capital gains rates on Federal taxes, but are not required for State tax forms.

Get Open Tax Solver at Fast, secure and Free Open Source software downloads   .   .   .     .   .   . Logo

Return to OpenTaxSolver Home