Fractions to decimals script needed

# Thread: Fractions to decimals script needed

1. Member
Join Date
Dec 1969
Posts
51

## Fractions to decimals script needed

Hello, I&#039m looking for a script to convert fractions to decimals. Anyone know where I can find something like that?<BR><BR>Thanks.

2. fl1rt Guest

## RE: Fractions to decimals script needed

excuse me, but I am slightly under the influence of alcohol<BR>but doesn&#039t the following convert a fraction into a decimal<BR><BR>dim a<BR>a = 22/7<BR>response.write a<BR><BR>????<BR>where "a" is a fraction and the output is decimal?<BR><BR>or do you mean<BR><BR>dim a<BR>a = "22/7"<BR><BR>????<BR><BR>in which case, search for the "/" and remove the respective numerator and denominator with the "left" and "right" functions and convert them to integer values and divide as previously shown.<BR><BR>if you want the source, ask, and I shall supply when I wake up with a sober head, tomorrow morning.

3. Member
Join Date
Dec 1969
Posts
32

## RE: Fractions to decimals script needed

Hehehe, fl1rt, I think you&#039ve VERY influenced by alcohol. :)<BR><BR>&#062; in which case, search for the "/" and remove the respective<BR>&#062; numerator and denominator with the "left" and "right"<BR>&#062; functions and convert them to integer values and divide as<BR>&#062; previously shown.<BR><BR>dim a<BR>a = "22/7"<BR>Response.Write Eval(a)<BR><BR>How&#039s that for you, drunk boy? :)<BR><BR>Take care,<BR>Lasse.<BR>( spacerain@spacerain.net )<BR>

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•