home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.databases
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!hobbes.physics.uiowa.edu!news.iastate.edu!vincent2.iastate.edu!cpetersn
- From: cpetersn@iastate.edu (Clifton R Peterson)
- Subject: Re: AREV MULTIVALUE Symbolics
- Message-ID: <cpetersn.722472899@vincent2.iastate.edu>
- Keywords: AREV MULTIVALUE SYMBOLIC
- Sender: news@news.iastate.edu (USENET News System)
- Organization: Iowa State University, Ames IA
- References: <By038z.4qA@resntl.bhp.com.au> <By2H5w.Dr7@nic.umass.edu> <cpetersn.722406918@vincent2.iastate.edu> <By4G07.1Jq@nic.umass.edu>
- Date: Sun, 22 Nov 1992 22:54:59 GMT
- Lines: 46
-
- In <By4G07.1Jq@nic.umass.edu> dtodd@titan.ucc.umass.edu (David M. Todd) writes:
-
- >In article <cpetersn.722406918@vincent2.iastate.edu> cpetersn@iastate.edu (Clifton R Peterson) writes:
- >>This should be as simple as using the following oconv[ersion]
- >>
- >>"MD02"
- >>
- >>which displays zero decimal points but divides the number by 100 before
- >>applying the zero decimal place rule.
- >>
- >>Clif
-
- >Right you are--almost. Should be "MD20". And it does work on
- >multivalues. I remember struggling with "scale" (the last digit in
- >the conversion) when I was trying to figure out how to round off
- >numbers. I never figured out that 0 would maintain the decimal
- >position from the original value. This is such a common operation
- >that it should at least be clearly and explicitly documented and
- >indexed.
-
- No, It should be MD02. You are right that the last digit is the scale which
- is the power of 10 to divide the data by before displaying it. I did some
- testing just after putting this message up and got the following
-
- msg(oconv(123456,"MD02")) => 1235
- msg(oconv(123449,"MD02")) => 1234
-
- At least, if I remember right, the problem was displaying DOLLARS type
- data rounded up to the nearest dollar or using MD0 without having to do
- the non-rounding divide of the data first.
-
- >Thanks Clif. I can simplify some of my routines now.
-
- Glad I could be of help. By the way, my code checking was in 3.01, so maybe
- it's different in the older version? <g> I've never actually used this
- functionality in code yet, but it just came to me when I saw the solutions
- that showed a loop in a symbolic.
-
- >|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ David M. Todd ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
- >|Department of Psychology, University of Massachusetts, Amherst, MA 01003 USA|
- >|Phone: 413/545-0158 ___ <DTodd@Titan.ucc.UMass.EDU> _____ Fax: 413/545-0996|
- --
- _________________________________________________________________________
- / Clifton R. Peterson 1108 Burnett (515)232-5254 \
- | B.S. Chem E Ames IA 50010 |
- \_______________"42"_is_one_hell_of_an_answer!!___________________________/
-