SPONSORS:






User Tag List

Results 1 to 5 of 5
  1. #1
    deo
    deo is offline
    Member
    Join Date
    Feb 2001
    Location
    SLC
    Posts
    30
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Convert integer to string

    Does anyone have code example that converts a integer to sting.

    Example:
    iStartLoop = 1 (This is my counter)
    sName = ABCDEF + iStartLoop

    The above will error because I'm trying to use a interger in a text field. I need to first convert the iStartLoop to a string so it will print the number of the loop along with the sName data.

    The result should be ABCDEF1.

    Regards
    Deo

  2. #2
    Senior Member
    Join Date
    Oct 1999
    Location
    Tyngsborough, MA
    Posts
    211
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Convert integer to string

    Str()

  3. #3
    deo
    deo is offline
    Member
    Join Date
    Feb 2001
    Location
    SLC
    Posts
    30
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Convert integer to string

    Thanks for the reply


    Are you saying to do it like this?

    str(iStartLoop)


    regards
    Deo

  4. #4
    Senior Member
    Join Date
    Aug 1999
    Location
    MA
    Posts
    129
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Convert integer to string

    Aside from Brian's comment about Str(), you can also do this embedded in a string, using the curly braces. This is a great feature of 4Test.

    Gives you this:
    Steven Tyler
    Manager - Performance Engineering

    Kronos Incorporated
    tel: +1 978 947 4219

  5. #5
    deo
    deo is offline
    Member
    Join Date
    Feb 2001
    Location
    SLC
    Posts
    30
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Convert integer to string

    Styler,


    Thanks, that code worked great. I had tried the curlies before but forgot to add the "". Thanks again


    regards
    DEO

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 04:19 AM.

Copyright BetaSoft Inc.