Fraction Plugin

Fraction Plugin for Real Studio 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 Universal, 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.

Fraction Plugin was programmed in C++ and compiled with Xcode 3.2.5 for the Mac, MinGW and MSYS for Windows, and Ubuntu 12.04 for Linux.


Download Fraction Plugin v 2.1. The download includes documentation and a sample project. (198 KB)

Back To Bob Delaney's Home Page