HP3000-L Archives

September 2013, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"James B. Byrne" <[log in to unmask]>
Reply To:
James B. Byrne
Date:
Tue, 10 Sep 2013 11:33:48 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (32 lines)
On Mon, September 9, 2013 18:18, Gilles Schipper wrote:
> Remove the "| bc" at the end and you will get the desired result.
>

That sort of avoids the issue as I would like to calculate a formula
with containing factors of arbitrary decimal precision and assign the
integer result to a variable.  Inside the shell I can do this:

shell/iX> x=$(echo "31.1 * 4.7" | bc)
shell/iX> echo $x
146.1
shell/iX> x=$(echo "31.1 * 4.7 + 2" | bc)
shell/iX> echo $x
148.1
shell/iX> x=$(echo "31.1 * 4.70 + 2" | bc)
shell/iX> echo $x
148.17

What I would like to do is the same thing albeit at the MPE : prompt
instead and assign the result to an MPE variable

-- 
***          E-Mail is NOT a SECURE channel          ***
James B. Byrne                mailto:[log in to unmask]
Harte & Lyne Limited          http://www.harte-lyne.ca
9 Brockley Drive              vox: +1 905 561 1241
Hamilton, Ontario             fax: +1 905 561 0757
Canada  L8E 3C3

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2