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: Conversion functions
Topic Summary:
Created On: 2-Aug-2005 17:08
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 Tuesday, August 2, 2005 7:00 PM

Answer:
int i = 45

string s = i "" // the empty string is concatenated with the int to form a string

;-)
 2-Aug-2005 17:08
User is offline View Users Profile Print this message


Brian Jackson

Posts: 10
Joined: 2-Aug-2005

Is there an existing function in the DXL environment that allows string-to-integer conversion?
Report this to a Moderator Report this to a Moderator
 2-Aug-2005 17:27
User is offline View Users Profile Print this message


Bruce Tuskey

Posts: 77
Joined: 2-Mar-2004

In DOORS 7.1 this works

string s = "323" // "323.9" will also print the same. The ".9" is truncated.
int i =0
i = intOf(s)
print i ""


Will print 323

-------------------------
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: 2-Aug-2005 at 17:41 by Bruce Tuskey
Report this to a Moderator Report this to a Moderator
 2-Aug-2005 17:33
User is offline View Users Profile Print this message


Brian Jackson

Posts: 10
Joined: 2-Aug-2005

Thanks, Bruce. What about going from integer to string?
Report this to a Moderator Report this to a Moderator
 2-Aug-2005 17:38
User is offline View Users Profile Print this message


Bruce Tuskey

Posts: 77
Joined: 2-Mar-2004

Answer Answer
int i = 45

string s = i "" // the empty string is concatenated with the int to form a string

;-)

-------------------------
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: 2-Aug-2005 at 17:50 by Bruce Tuskey
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.