Thanks:  0
Likes:  0
Dislikes:  0

1. ## evaluating math

User Shum, Garry (garry.shum@royalbank.com) posted:

Content-Type: text/plain;
charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

I am extracting the following string from a sentence and need to evaluate i=
t
mathematically....

"8*8+24/4-4"

...I am getting the above string from a sentence so it is a string from the
very beginning. How would I evaluate the above to equal 66 rather than int=
o
the literal string "8*8+24/4-4"?
---------------------------------------------------------------------------=
---------------------------------------------------------------
This e-mail may be privileged and/or confidential, and the sender does not =
waive any related rights and obligations. Any distribution, use or copying =
of this e-mail or the information it contains by other than an intended rec=
me (by return e-mail or otherwise) immediately.=20

Ce courriel est confidentiel et prot=E9g=E9. L'exp=E9diteur ne renonce pas =
aux droits et obligations qui s'y rapportent. Toute diffusion, utilisation =
ou copie de ce message ou des renseignements qu'il contient par une personn=
e autre que le (les) destinataire(s) d=E9sign=E9(s) est interdite. Si vous =
recevez ce courriel par erreur, veuillez m'en aviser imm=E9diatement, par r=
etour de courriel ou par un autre moyen.=20

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D

Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

< !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; charset=3Diso-8859-=
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version 5.5.2654.19"=

a sentence and need to evaluate it mathematically....</FONT>

ntence so it is a string from the very beginning. How would I evaluat=
e the above to equal 66 rather than into the literal string &quot;8*8+24/4-=
< !-- |**|begin egp html banner|**| -->

<tr bgcolor=3D#FFFFCC>
<td align=3Dcenter><font size=3D"-1" color=3D#003399>[b]Yahoo! Groups Spons=
<tr bgcolor=3D#FFFFFF>
<td width=3D470><a href=3D"http://rd.yahoo.com/M=3D201903.1442211.3019428.1=
252795/D=3Degroupmail/S=3D1700007181:N/A=3D662184/?http://store.yahoo.com/c=
95/D=3Degroupmail/S=3D1700007181:N/A=3D662184/R=3D0/993165087+http://websit=
e.yahoo.com" target=3D"_top"><img width=3D468 height=3D60 src=3D"http://us.=
a1.yimg.com/us.yimg.com/a/ya/yahoo_domain/batch6/northws2b.gif" alt=3D"Yaho=
Yahoo! Website Services- C=
lick Here!</a></td>
com/l?M=3D201903.1442211.3019428.1252795/D=3Degroupmail/S=3D1700007181:N/A=

< !-- |**|end egp html banner|**| -->

Post message: winrunner@yahoogroups.com

Subscribe: winrunner-subscribe@yahoogroups.com

Unsubscribe: winrunner-unsubscribe@yahoogroups.com

***To unsubscribe via email: From your email program, send a blank message =
to winrunner-unsubscribe@yahoogroups.com.

*To respond offline to an individual, locate the sender's email address in =
the email message

*To view archives go to groups.yahoo.com

Eric Marx

dynamic web site development &amp; hosting
This e-mail may be privileged and/or confidential, and the sender does not =
waive any related rights and obligations. Any distribution, use or copying =
of this e-mail or the information it contains by other than an intended rec=
me (by return e-mail or otherwise) immediately.

Ce courriel est confidentiel et prot=E9g=E9. L'exp=E9diteur ne renonce pas =
aux droits et obligations qui s'y rapportent. Toute diffusion, utilisation =
ou copie de ce message ou des renseignements qu'il contient par une personn=
e autre que le (les) destinataire(s) d=E9sign=E9(s) est interdite. Si vous =
recevez ce courriel par erreur, veuillez m'en aviser imm=E9diatement, par r=
etour de courriel ou par un autre moyen.

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=

2. ## Re: evaluating math

User Steve Mathisen (scmathisen@hotmail.com) posted:

Gary,
Is it always supposed to be equal to 66 and is it always supposed to be
the same mathematical phrase? If so, just evaluate it as a string and let
that be that.
If not, you will have to parse out the numbers and mathematical operators
and evaluate each element individually. I would suggest some sort of case
statement with expected values (digits and operators). You could then run
the math from the statement that you have created and compare the results
with what you expect.

Steve

From: "Shum, Garry " <garry.shum@royalbank.com>
To: "'WinRunner Mailing List'" <winrunner@yahoogroups.com>
Subject: [winrunner] evaluating math
Date: Thu, 21 Jun 2001 19:09:01 -0400

I am extracting the following string from a sentence and need to evaluate it
mathematically....

"8*8+24/4-4"

...I am getting the above string from a sentence so it is a string from the
very beginning. How would I evaluate the above to equal 66 rather than into
the literal string "8*8+24/4-4"?
------------------------------------------------------------------------------------------------------------------------------------------
This e-mail may be privileged and/or confidential, and the sender does not
waive any related rights and obligations. Any distribution, use or copying
of this e-mail or the information it contains by other than an intended
advise me (by return e-mail or otherwise) immediately.

Ce courriel est confidentiel et protégé. L'expéditeur ne renonce pas aux
droits et obligations qui s'y rapportent. Toute diffusion, utilisation ou
copie de ce message ou des renseignements qu'il contient par une personne
autre que le (les) destinataire(s) désigné(s) est interdite. Si vous recevez
ce courriel par erreur, veuillez m'en aviser immédiatement, par retour de
courriel ou par un autre moyen.

================================================== ============================

__________________________________________________ _______________

3. ## Re: evaluating math

User Hauswirth, Joachim (Joachim.Hauswirth@dresdner-bank.com) posted:

have you tried:
public blubb;
public a;

blubb = "8*8+24/4-4";
eval("a = " & blubb & ";" );

This gives me the 66 in the variable a.

HTH,

Joachim

-----Ursprüngliche Nachricht-----
Von: Shum, Garry [mailto:garry.shum@royalbank.com]
Gesendet am: Freitag, 22. Juni 2001 01:09
An: 'WinRunner Mailing List'
Betreff: [winrunner] evaluating math

I am extracting the following string from a sentence and need to evaluate it
mathematically....

"8*8+24/4-4"

...I am getting the above string from a sentence so it is a string from the
very beginning. How would I evaluate the above to equal 66 rather than into
the literal string "8*8+24/4-4"?

4. ## Re: evaluating math

User Robert Scheffel (scheffelr@hotmail.com) posted:

Yup that works all right
__________________________________________________ _______________

5. ## Re: evaluating math

User Shum, Garry (garry.shum@royalbank.com) posted:

------_=_NextPart_001_01C0FB2E.5C6F9DA0
Content-Type: text/plain;
charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

Thanks. I tried using eval() and forgot to put the &";" in the parameter.

6. ## Re: evaluating math

User Shum, Garry (garry.shum@royalbank.com) posted:

------_=_NextPart_001_01C0FB2E.91EE6100
Content-Type: text/plain;
charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

Already did all of that. The problem was because I forgot to put &";" as
part of the parameter to the eval() function. Works fine now.

7. ## Re: evaluating math

use the eval function in WR

This executes whatever u give as parameters,assuming they are TSL statements.so

just do this
eval("Total=" & <the string variable having ur expression>);

<BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Garry Shum:
User Shum, Garry (garry.shum@royalbank.com) posted:

Content-Type: text/plain;
charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

I am extracting the following string from a sentence and need to evaluate i=
t
mathematically....

"8*8+24/4-4"

...I am getting the above string from a sentence so it is a string from the
very beginning. How would I evaluate the above to equal 66 rather than int=
o
the literal string "8*8+24/4-4"?
<HR></BLOCKQUOTE>

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.