SPONSORS:






User Tag List

Results 1 to 5 of 5

Thread: Long Strings

  1. #1
    Member
    Join Date
    Oct 2000
    Location
    South San Francisco, CA, USA
    Posts
    32
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Long Strings

    I'm trying to pass a long SQL query to a database through Silk and I've run into a really annoying problem: Silk doesn't recognize a string if it has a line continuation character in it. Unfortunately my string is longer than the buffer for each line in the text editor so some form of string continuation character would be ideal.

    Any ideas?

  2. #2
    Senior Member
    Join Date
    Jun 2000
    Location
    Chicago, IL USA
    Posts
    383
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Long Strings

    It is understandable that SilkTest does not recognize a continuation character INSIDE of your quotes.

    Instead of trying to quote the string in one line, break it up, and put it back together with the "+" concatenation operator.

    Example:
    Instead of:
    STRING s = "this is not really that long of a string"

    Do this:
    STRING s = "this is not really " +
    "that long of a string"

    Rob Kapteyn, CSTE
    RobKapteyn@gmail.com

  3. #3
    Member
    Join Date
    Oct 2000
    Location
    South San Francisco, CA, USA
    Posts
    32
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Long Strings

    Thanks, Rob for the post.

    After I posted I did think of concatenation myself and it does seem to work. I am still not clear though on why the editor would not recognize the string after a Shift-Enter.



    [This message has been edited by MichaelH (edited 01-03-2001).]

  4. #4
    Senior Member
    Join Date
    Jun 2000
    Location
    Chicago, IL USA
    Posts
    383
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Long Strings

    I think it is correct of the editor to complain -- because it is ambiguous.
    Do you want the "shift-enter" character in the string or not ?
    The "shift-enter" code might also be different on different platforms.
    If you do what a special ascii character in your string do this:
    "This string has an ascii 11 at the end {chr(11)}"

    -Rob
    Rob Kapteyn, CSTE
    RobKapteyn@gmail.com

  5. #5
    Junior Member
    Join Date
    Sep 2001
    Location
    Belmont, Ca, USA
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Long Strings

    Thanks, this was very helpful to me today.

 

 

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 09:09 PM.

Copyright BetaSoft Inc.