home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / database / 8026 < prev    next >
Encoding:
Text File  |  1992-11-22  |  2.7 KB  |  59 lines

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