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: display an int value
Topic Summary:
Created On: 25-Oct-2005 13:50
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.
 25-Oct-2005 13:50
User is offline View Users Profile Print this message


Baher Mohamed

Posts: 63
Joined: 21-Jun-2005

looking for the syntax to display the value in a counter variable that is of type 'int'

display MyCounter "some text here" that statement works by turing the number into a string and concatinating it with the text, but i'd prefer to get the right way to do it..
Report this to a Moderator Report this to a Moderator
 25-Oct-2005 22:36
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

I made a failed effort and writing a routine to convert an integer to a string; cycling through each digit, taking remainders, dividing by 10, then looking up the character in a 10-cell Char array, yaddy yaddy. Didn't work very fast.

No. Convert an integer to a string by catenating a string:
int iInt = 22
string sInt = iInt ""

- Louie
Report this to a Moderator Report this to a Moderator
 27-Oct-2005 13:52
User is offline View Users Profile Print this message


Paul Worrall

Posts: 87
Joined: 30-Sep-2003

quote:

Originally posted by: Baher Mohamed
looking for the syntax to display the value in a counter variable that is of type 'int'
display MyCounter "some text here" that statement works by turing the number into a string and concatinating it with the text, but i'd prefer to get the right way to do it..


You are doing it the 'right' way. Maybe you haven't realised that you can use a zero-length string i.e.:
display MyCounter ""
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.