[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Numeric Vars



Thanks for the suggestion of using an edit mask - the numbers look like you
described!!!!
So, what I did was round the two variables to 2 decimal places, and the
program ran as expected!

Thanks to everyone for all of your helpful suggestions!!!!!

--
William Beckner -- Stunt Programmer (Just call me "Bill")
Illinois Central College, Rm L141 -- East Peoria, IL  61635-0001
PH: (309) 694-8419 -- FAX: (309) 694-8995
"An unfinished thought is like a day without..."

 -----Original Message-----
From:   the dragon [mailto:ceprn@hotmail.com]
Sent:   Thursday, July 12, 2001 11:37 AM
To:     Bill Beckner
Subject:        Re: Numeric Vars

bill,

because you don't see the entire number, just what the default edit mask
shows.

one of your numbers may be like 12696.840000000000000000001.  It's kind of
like that Pentium bug they had 7 years ago.  What version of sqr are you
using?

Try this....  Convert the numbers to characters, with an identical edit mask

and compare them....

clark 'the dragon' willis
dragon enterpises, consulting services


----Original Message Follows----

Here's a puzzle for all you SQR experts....

I've got these two numeric variables, assigned the same amount, and I
display their values like this:

     SHOW '#New_Posted_amt ' #New_Posted_amt
     SHOW '#Ttl_Proj_Amt2  ' #Ttl_Proj_Amt2

And the following shows in the sqr.log:

     #New_Posted_amt 12696.840000
     #Ttl_Proj_Amt2  12696.840000

When the following comparison is performed:

     if #New_Posted_amt > #Ttl_Proj_Amt2
         do Print-Error-Message
     end-if

I always get an error message!!!  Any ideas?  We're using SQR 4.3.4

Thanks!!!

Why does SQR

--
William Beckner -- Stunt Programmer (Just call me "Bill")
Illinois Central College, Rm L141 -- East Peoria, IL  61635-0001
PH: (309) 694-8419 -- FAX: (309) 694-8995
"An unfinished thought is like a day without..."


PSA: Salary <> Slavery.  If you earn a salary, your employer is renting your

services for 40 hours a week, not purchasing your soul.

NOTICE:  The information contained in this message is protected under United

States and international copyright laws and is intended for the personal and

confidential use of the addressee.  If you are not the addressee or an agent

of the addressee, you are hereby notified that you have received this
message in error and that any review, dissemination, distribution, taking of

any action in reliance upon or copying of this message without the express
written permission of the sender or his agent is strictly prohibited and in
violation of referenced statutes.  If you have received this message in
error, please notify me (the sender) immediately and you are instructed to
delete this message from any computer it resides on, including mail servers.

SIGNATURE :
Do not meddle in the affairs of dragons, for you are crunchy and taste good
with ketchup.
You've got to be a Spirit; don't need no Ghosts.
Do or Do Not; There is NO Try.
Any clod can have facts, but having an opinion is an art !
A conclusion is simply the place where someone got tired of thinking.
When a continuing state of defiance and disorder can not be checked by the
rules, then new and sometimes drastic rules must be forged to maintain
order; the alternative is anarchy.
M. Clark Willis III - Sr Systems Analyst, Sr Consultant ceprn@hotmail.com
aolim:ceprn ICQ 6633136

Help stamp out SPAM!! http://www.cauce.org

The senders of unsolicited commercial e-mail to me at any site are liable
for a $500 per message cost under USC 47, which may be found at
http://www.law.cornell.edu/uscode/47
Contents of this message, in it's entirety, (c) 2000 M. Clark Willis III /
Dragon Enterprises inc.  All rights reserved.



_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com