![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: how do i get the integer value from an enumerated attribute Topic Summary: Created On: 24-Aug-2005 18:21 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
I have an enumerated list High-5, med-high-4, med-3...etc as an attribute. I want the number value assigned to the choices not the text value.... |
|
![]() |
|
![]() |
|
All you need to do is to cast the enumeration into an integer variable.
For example, I want to find the priority number from your list, for the current object I would use:- Object o = current int myInt = o."Priority" print myInt"" myInt will be set to the value specified by the enumerant, so if my object has a priotity of high, myInt would be set to 5 ------------------------- Graham Stradling, Alcatel-Lucent. |
|
![]() |
|
![]() |
|
Thanks! Much appreciated.
|
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.