replace . with space in it
get word 2 of it
Jim Ault
Las Vegas
On 5/21/06 10:01 PM, Kay C Lan [EMAIL PROTECTED] wrote:
Peter T. Evens originally wrote:
Is there another way to isolate the decimal portion?
On 5/20/06, Scott Rossi [EMAIL PROTECTED] wrote:
Here's one way (I bet there
Oh, that's just TOOO clever :-)
I reckon this one wins the prize!
Sarah
On 5/22/06, Jim Ault [EMAIL PROTECTED] wrote:
replace . with space in it
get word 2 of it
Jim Ault
Las Vegas
On 5/21/06 10:01 PM, Kay C Lan [EMAIL PROTECTED] wrote:
Peter T. Evens originally wrote:
Is there
For correct results, use:
theNumber mod 1
e.g.:
put ((1/3) mod 1) * 10E9
Best,
Mark
--
Economy-x-Talk
Consultancy and Software Engineering
http://economy-x-talk.com
http://www.salery.biz
Salery is the easiest way to get your own web store on-line: http://
www.salery.biz/salery.html
I must admit this was on a Windows machine. Intel is notorious for math
issues (well maybe not notorious). Remember the Pentium problem way back
that had researchers up in arms? I guess the new Mactel machines, however,
will give the same results. I don't have one here yet to try it on.
Dar-
Sunday, May 21, 2006, 5:32:25 PM, you wrote:
There are values for numberFormat that will break that. So, perhaps a
Ah... good point. I *do* regard tacking on an empty string to trick
the parser as a hack, and I haven't tried it in conjunction with
setting a non-default numberFormat. But I
On May 22, 2006, at 11:06 AM, Mark Wieder wrote:
I *do* regard tacking on an empty string to trick
the parser as a hack, and I haven't tried it in conjunction with
setting a non-default numberFormat. But I always thought numberFormat
was a post-numeric-processing display thing.
I had not
Dar-
Saturday, May 20, 2006, 4:18:10 PM, you wrote:
What would you recommend as the new behavior for Revolution trunc()?
Actually, I'm quite happy with what I posted as new behavior. I never
use trunc() by itself anymore, always tacking an empty string onto the
end. This gives the desired
Richard-
Saturday, May 20, 2006, 1:54:40 PM, you wrote:
This sounds very much like an issue we batted around here last year with
trunc that turned out to be a feature of the processor
Indeed. See my answer to Dar. Although it's not a feature of the
processor so much as of the way standard
On May 21, 2006, at 5:48 PM, Mark Wieder wrote:
Tacking an
empty string before truncating always gives the correct answer.
There are values for numberFormat that will break that. So, perhaps a
value for numberFormat will need to be specified if that is the new
trunc().
I had one time
Peter T. Evens originally wrote:
Is there another way to isolate the decimal portion?
On 5/20/06, Scott Rossi [EMAIL PROTECTED] wrote:
Here's one way (I bet there are more):
get char offset(.,tNumber) to -1 of tNumber
set the itemDelimiter to .
--item 1 is the integer
--item 2 is
Avoiding trunc(), this seems to work
put round((10.27 mod 1) *100,0)
Best,
Mark
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
Peter-
Friday, May 19, 2006, 12:04:55 PM, you wrote:
I am doing the following:
put 10.27 into tNumber
put the trunc of tNumber into tInteger
put tNumber - tInteger into tDecimal
put 100 * tDecimal into tNew Decimal
put the trunc of tNewDecimal
and I get 26 instead of 27.
put
Mark Wieder wrote:
Peter-
Friday, May 19, 2006, 12:04:55 PM, you wrote:
I am doing the following:
put 10.27 into tNumber
put the trunc of tNumber into tInteger
put tNumber - tInteger into tDecimal
put 100 * tDecimal into tNew Decimal
put the trunc of tNewDecimal
and I get 26 instead of
On May 20, 2006, at 1:09 PM, Mark Wieder wrote:
Note: this is BZ #2419, which for some reason Tuviah closed as
NOT_A_BUG in January 2004, so unless Jacque reopens it it's unlikely
that it will be fixed.
What would you recommend as the new behavior for Revolution trunc()?
I'm assuming you
Mark Wieder wrote:
Peter-
Friday, May 19, 2006, 12:04:55 PM, you wrote:
I am doing the following:
put 10.27 into tNumber
put the trunc of tNumber into tInteger
put tNumber - tInteger into tDecimal
put 100 * tDecimal into tNew Decimal
put the trunc of tNewDecimal
and I get 26 instead of
On May 20, 2006, at 6:04 PM, J. Landman Gay wrote:
By the way, I just tried the original script (quoted at the top
above,) using Mac OS 10.4.6 and I did not get 26, I got 27 as
expected. I suspect it is system-related. I believe the Rev engine
relies on the OS's math routines to get its
Dar Scott wrote:
On May 20, 2006, at 6:04 PM, J. Landman Gay wrote:
By the way, I just tried the original script (quoted at the top
above,) using Mac OS 10.4.6 and I did not get 26, I got 27 as
expected. I suspect it is system-related. I believe the Rev engine
relies on the OS's math
I am doing the following:
put 10.27 into tNumber
put the trunc of tNumber into tInteger
put tNumber - tInteger into tDecimal
put 100 * tDecimal into tNew Decimal
put the trunc of tNewDecimal
and I get 26 instead of 27.
Am I doing something wrong? Is this a bug? Is there another way to
try
get 10.27
get (it-(it div 1)*100
Jim Ault
Las Vegas
On 5/19/06 12:04 PM, Peter T. Evensen [EMAIL PROTECTED] wrote:
I am doing the following:
put 10.27 into tNumber
put the trunc of tNumber into tInteger
put tNumber - tInteger into tDecimal
put 100 * tDecimal into tNew Decimal
put
put 10.27 into tNumber
put the trunc of tNumber into tInteger
put tNumber - tInteger into tDecimal
put 100 * tDecimal into tNew Decimal
put tNewDecimal
-- put the trunc of tNewDecimal
= 27
On May 19, 2006, at 12:04 PM, Peter T. Evensen wrote:
put 10.27 into tNumber
put the trunc of
Recently, Peter T. Evensen wrote:
I am doing the following:
put 10.27 into tNumber
put the trunc of tNumber into tInteger
put tNumber - tInteger into tDecimal
put 100 * tDecimal into tNew Decimal
put the trunc of tNewDecimal
and I get 26 instead of 27.
Am I doing something wrong?
It seems like there is some funky math going on here. In looking at
things, after 100 * tDecimal into tNewDecimal, tNewDecimal contains 27
the trunc of 27 should be 27, not 26.
At 02:17 PM 5/19/2006, you wrote:
put 10.27 into tNumber
put the trunc of tNumber into tInteger
put tNumber -
Ok, I didn't think of just using the string functions. I guess I'm too
used to typed languages. LOL
At 02:20 PM 5/19/2006, you wrote:
Recently, Peter T. Evensen wrote:
I am doing the following:
put 10.27 into tNumber
put the trunc of tNumber into tInteger
put tNumber - tInteger into
Peter T. Evensen wrote:
I am doing the following:
put 10.27 into tNumber
put the trunc of tNumber into tInteger
put tNumber - tInteger into tDecimal
put 100 * tDecimal into tNew Decimal
put the trunc of tNewDecimal
and I get 26 instead of 27.
Am I doing something wrong? Is this a bug? Is
--- Mark Swindell [EMAIL PROTECTED] wrote:
put 10.27 into tNumber
put the trunc of tNumber into tInteger
put tNumber - tInteger into tDecimal
put 100 * tDecimal into tNew Decimal
put tNewDecimal
-- put the trunc of tNewDecimal
= 27
On May 19, 2006, at 12:04 PM, Peter T.
On May 19, 2006, at 1:04 PM, Peter T. Evensen wrote:
put 10.27 into tNumber
put the trunc of tNumber into tInteger
put tNumber - tInteger into tDecimal
put 100 * tDecimal into tNew Decimal
put the trunc of tNewDecimal
and I get 26 instead of 27.
Am I doing something wrong? Is this a bug?
26 matches
Mail list logo