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: Converting an integer based attribute to a string based attribute
Topic Summary:
Created On: 21-Jul-2005 21:21
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 Bruce Tuskey, on Friday, July 22, 2005 1:01 AM

Answer:
You can use a space and empty string ("") to create a concatenated string with an int

int intTemp = 9
string strTemp = intTemp ""
or
string strTemp = 9 ""

If you need a function, try this:
 21-Jul-2005 21:21
User is offline View Users Profile Print this message


Rob Church

Posts: 1
Joined: 21-Jul-2005

We are modifying an attribute to be string based from its current type of integer.  The plan is to read the module and if the integer based attribute has a value, convert it to a string and write it to the new string based attribute.  The problem is that I can't find a function that will take an integer and convert it to a string.  This would be similar to C's sprintf.

Report this to a Moderator Report this to a Moderator
 21-Jul-2005 21:27
User is offline View Users Profile Print this message


Bruce Tuskey

Posts: 77
Joined: 2-Mar-2004

Answer Answer
You can use a space and empty string ("") to create a concatenated string with an int

int intTemp = 9
string strTemp = intTemp ""
or
string strTemp = 9 ""

If you need a function, try this:

-------------------------
Bruce Tuskey
Sr. Principle Engineer
Tuskey@gmail.com

"All that is gold does not glitter, not all those who wander are lost:..." - Gandalf the Grey (JRR Tolkien)

Edited: 21-Jul-2005 at 22:10 by Bruce Tuskey
Report this to a Moderator Report this to a Moderator
 21-Jul-2005 22:54
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

yes, concatenate the integer with an empty string. You'll find lots of places you need to do that.

Its possible you'll want to convert an integer zero into an empty string.

- Louie
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 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 1 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.