![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Convert between text and numbers Topic Summary: Created On: 27-Mar-2006 13:42 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
look at intOf, realOf, stringOf and format
|
|
![]() |
|
![]() |
|
converting an integer to a string is simply a matter of concatenating it with the empty string
eg string s = 23 "" To convert a string to an integer you can use the age old trick of "intOf(realOf("123"))" or perhaps a simple function as follows: - ------------------------- Regards, Richard Good |
|
![]() |
|
![]() |
|
Here's the two library functions I use. I suppose I should write function "fIntOf" that looks like this:
int fIntOf(string InString) { // If the InString contains a valid integer then return it; otherwise return -1 int Outint if (fStringToInt(InString, OutInt)) return(OutInt) else return(-1) } // end fIntOf() - Louie Edited: 28-Mar-2006 at 20:20 by Louie Landale |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Convert between text and numbers
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.