![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Truncating real number trailing zeros Topic Summary: Created On: 9-Mar-2005 20:37 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
I was curious if there was any easy way to truncate the trailing zeros which exist when placing real numbers into a field (i.e. - I'd like: 1.0, I get: 1.000000). I'm sure there's a way to write my own DXL, but I'd like to not do that if possible.
thanks, Dan |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
I tried this but it didn't work. Do I need to replace 'places' with the name of my attribute??
------------------------- Brenda Heiss Cornell |
|
![]() |
|
![]() |
|
It does work, but you need to be careful to use it correctly.
I didn't explain properly in the first post. The function returns a string, not a real. If the result is cast to a real by assigning to a DXL attribute of type real then the trailing zeroes will get added again. The following works in a dxl attribute of type string: ------------------------- Tony Goodman http://www.smartdxl.com Edited: 3-Nov-2005 at 09:41 by Tony Goodman |
|
![]() |
Telelogic DOORS
» General Discussion
»
Truncating real number trailing zeros
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.