[jawsscripts] Re: decimal points?

  • From: Doug Lee <doug.lee@xxxxxxxxxxxxxxxx>
  • To: jawsscripts@xxxxxxxxxxxxx
  • Date: Fri, 12 Dec 2008 17:31:20 -0500

To do decimal math, you have to play games to get it to fit within
integer math.  For example, you can't actually calculate 5/13, but you
can calculate 5000/13, manually round via string manipulation, and
figure out where to insert the decimal point in your spoken result.
This is of course tedious, but if you need decimal math in JAWS, it's
the simplest answer I know.  Anything else would involve playing with
COM objects and would probably require about as much code as the
method I just outlined.

On Fri, Dec 12, 2008 at 02:44:33PM -0700, Jackie McBride wrote:
Martin, Jaws scripting really is not designed to do that kind of
thing. Its primary function is to make programs more accessible to
screen readers. U should use perl or vb or something similar if u need
report functionality.

On 12/12/08, Martin <martinfc@xxxxxxxxxx> wrote:
> As they say, when it rains?
> I want to performa simple calculation to get a percentage.
> For example, (5/13)*100 is supposed to give me 38.46%.  But because Jaws
> takes off any decimal, I get 0 every time.
> Am I stepping out of the Jaws scripting limits here?
> I'm using the script language to create a report and maybe it's just too
> ambitious.
> Cheers,
> martin
>
>
> __________
> Visit and contribute to The JAWS Script Repository http://jawsscripts.com
>
> View the list's information and change your settings at
> http://www.freelists.org/list/jawsscripts
>
>


-- 
Change the world--1 deed at a time
Jackie McBride
Check out my homepage at:
www.abletec.serverheaven.net
& please join my fight against breast cancer
<http://teamacs.acsevents.org/site/TR?px=1790196&pg=personal&fr_id=3489>
__________?
Visit and contribute to The JAWS Script Repository http://jawsscripts.com

View the list's information and change your settings at 
http://www.freelists.org/list/jawsscripts

-- 
Doug Lee, Senior Accessibility Programmer
SSB BART Group - Accessibility-on-Demand
mailto:doug.lee@xxxxxxxxxxxxxxxx  http://www.ssbbartgroup.com
"While they were saying among themselves it cannot be done,
it was done." --Helen Keller
__________ 
Visit and contribute to The JAWS Script Repository http://jawsscripts.com

View the list's information and change your settings at 
http://www.freelists.org/list/jawsscripts

Other related posts: