Fraction Plugin
Fraction Plugin for Xojo allows you to construct programs which can handle fractions much like doubles and integers are handled. A fraction is represented by two integers, num/den.
It can be used to build Mac OS X, Windows, and Linux applications.
The operators +, -, *, and / are overloaded. So, for example, these REALbasic statements are valid:
Dim x,y,z As Fraction
x=new Fraction( "-1 1/2")
y=new Fraction("13/3")
z = x+y
EditFieldz.Text = z.Str // shows 2 5/6
And this statement is also valid:
z = 2*x // z will represent -3/1
Version 1.0.1 fixes a bug where z.Str might modify the fraction z.
Version 1.1 renames Fraction Plugin exceptions so as to be compatible with REALbasic 2005.
Version 1.2 adds support for creating Mac OS X Universal applications with REALbasic 2006 Release 4.
Version 2.0 is now compatible with REALbasic 2009.
Version 2.1 makes the plugin console safe.
Version 3.0 allows both 32 and 64 bit applications.
Fraction Plugin was programmed in C++ and compiled with Xcode 9.2 for the Mac, mingw for Windows, and Ubuntu for Linux.
Freeware.
Download Fraction Plugin v 3.0. The download includes documentation and a sample project.
FractionPlugin.zip (270 KB)