Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: Adding value to the enumerated attribute
Topic Summary:
Created On: 25-Jul-2006 22:55
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
Answer This question was answered by Paul Worrall, on Wednesday, July 26, 2006 4:38 PM

Answer:
The built-in += operator does not work for strings. I think what you need is:

o."Compliant " += "Vegas"
 25-Jul-2006 22:55
User is offline View Users Profile Print this message


Krishna Kandala

Posts: 170
Joined: 8-Jul-2006

We are using DOORS 7.1. I want to add another value to multivalued enumerated attributes and I am getting an error. The code is attached:
Will someone tell me where I am going wrong? Thanks in advance.
Object o = current
if(isMember(o."Compliant ", "Azul")) print "yes"
//prints yes.
string s = o."Compliant "
string s1 = "Vegas"
s += s1
// Error; incorrect arguments for (+=).

Report this to a Moderator Report this to a Moderator
 26-Jul-2006 09:44
User is offline View Users Profile Print this message


Paul Worrall

Posts: 87
Joined: 30-Sep-2003

Answer Answer
The built-in += operator does not work for strings. I think what you need is:

o."Compliant " += "Vegas"

Edited: 26-Jul-2006 at 09:47 by Paul Worrall
Report this to a Moderator Report this to a Moderator
 26-Jul-2006 10:28
User is offline View Users Profile Print this message


Reik Schroeder

Posts: 361
Joined: 28-Jul-2003

Hi Krishna,

Paul is right.
Alternatively you could use this solution

Greetings
Reik Schroeder

-------------------------
Evosoft GmbH
for Siemens Industry Sector


Berlin, Germany
Report this to a Moderator Report this to a Moderator
 26-Jul-2006 16:38
User is offline View Users Profile Print this message


Krishna Kandala

Posts: 170
Joined: 8-Jul-2006

Thanks for the response, Paul and Reik. In fact that is what I tried after posting the topic. It works fine.

- Krishna
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 0 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 0 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.