	FuzzyLogic
	Presents
	Apples & Oranges for IZL



Apples & Oranges is an IZL source code file - distributed for free - for the IZL Interpreter.

Use this little program as follows for product cost and shipping/handling/tax cost computations:

1. Enter the price for the first type of goods (Apples) or use the default price.
2. Enter the price for the second type of goods (Oranges) or use the default price.
3. Enter the number of units for one or two types of goods.
4. Press the Compute! button to get a result as follows:
	a)	By default: price * units + 10% of same as flat handling/shipping/tax (Crating) charge.
	b)	On entry of 0 in Percentage field: price * units only.
5. Enter a different percentage in the Percentage field if the Crating charge is higher or lower than the 10% default charge.
6. You can save a result by pressing the Save Current Total button, then go a different computation, for instance based on fewer, cheaper apples and more, costlier oranges or other crating charges The Save Current Total field will continue to show the earlier result, so you can compare both totals.

The Apples Cost, Oranges Cost, Crating and Total fields are editable in order to permit rounding of results but any changes made there will not change the computation.

The Reset button resets percentage, price and units fields to their default values.

The Code:

I commented the code extensively so others can improve on it. 

The comments in the code will also help you change the defaults. For instance, if your zidgets regular price is 400, change it in the source code.

Note, that system crashes may result if numbers above 32K are used.

The AOrangeZ.IZL  file has been optimized for the Zoomer and some desktop displays.  The AOrangeD.IZL file is better for some other displays, such as with 800x600 Video and small/small Look&Feel settings in Preferences. Feel free to edit the location lines to improve the placement of fields on your system.

Finally, the code makes the IZL Interpreter window increase in size, on some displays, including the Zoomer's, beyond the bottom edge of the screen. Thus, the Stop button can become inaccessible. In such cases, on the Zoomer select another application to get rid of this one. On the desktop, press the file button to exit the program or hit F3.

Thanks:

Thanks for looking at this. I'm most likely to see your comments if you leave them in the Geoworks Forum on America Online. 

Thanks, most of all, to the IZL Interpreter's author, John Feras, who enriched the world of GEOS by creating the IZL interpreter language.


Copyright 1994 Clemens Kochinke d/b/a FuzzyLogic
ClemensKo @ aol.com
