[MWForum]Zehava's Calulator simplified
Jeff Knope
mwforum@lists.mathcats.com
Wed, 28 Jul 2004 14:36:36 -0700
This is a multi-part message in MIME format.
------=_NextPart_000_002A_01C474B0.4987A8F0
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
Hi Zehava,
Actually, there's a little simpler way. In to send instead of doing the =
second get "display "text, the results of that are already held in =
:list1. So, the last line of to send may read:
set "display "text (se :list1 " "=3D " :ans) Note the spaces following =
the quote marks and equals sign.
There is no perceptible performance advantage in this, just a little =
cleaner job.
I notice it has no difficulty handling multiple operators, such as 432 * =
212 / 87. However, sometimes you need the specify the order of =
execution. This is done with "(" and ")" strategically placed according =
to the rules of precedence. A really complete deal would be to add that =
capability. Come to think of it, there's no reason you couldn't expand =
the functions to include all the other MW math operations, such a square =
root, trig functions, etc.
Good luck, --Jeff
------=_NextPart_000_002A_01C474B0.4987A8F0
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dwindows-1252"><BASE=20
href=3D"file://C:\Program Files\Common Files\Microsoft =
Shared\Stationery\">
<STYLE>BODY {
MARGIN-TOP: 50px; FONT-SIZE: 10pt; MARGIN-LEFT: 50px; COLOR: #800000; =
FONT-FAMILY: Arial
}
</STYLE>
<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR></HEAD>
<BODY bgColor=3D#f2f0e2 background=3D"">
<DIV>Hi Zehava,</DIV>
<DIV> </DIV>
<DIV>Actually, there's a little simpler way. In <STRONG>to send =
</STRONG>instead=20
of doing the second <STRONG>get "display "text</STRONG>, the results of =
that are=20
already held in <STRONG>:list1</STRONG>. So, the last line of <STRONG>to =
send</STRONG> may read:</DIV>
<DIV> </DIV>
<DIV><STRONG>set "display "text (se :list1 " "=3D "=20
:ans) </STRONG>Note the spaces following the quote marks =
and=20
equals sign.</DIV>
<DIV><STRONG></STRONG> </DIV>
<DIV>There is no perceptible performance advantage in this, just a =
little=20
cleaner job.</DIV>
<DIV> </DIV>
<DIV>I notice it has no difficulty handling multiple operators, such as =
432 *=20
212 / 87. However, sometimes you need the specify the order of =
execution. This=20
is done with "(" and ")" strategically placed according to =
the rules=20
of precedence. A really complete deal would be to add that capability. =
Come to=20
think of it, there's no reason you couldn't expand the functions to =
include all=20
the other MW math operations, such a square root, trig functions, =
etc.</DIV>
<DIV> </DIV>
<DIV>Good luck, --Jeff</DIV></BODY></HTML>
------=_NextPart_000_002A_01C474B0.4987A8F0--