Just in case SPACE isn't supported in the future

« Return to Article
  • clambaker 2005-08-08 21:49
    nice
  • paranoidgeek 2005-08-08 22:00
    In PHP :<br>
    <br>
    $text = preg_replace("/[!@#$%^&amp;\*\(\)\-_\+=]/", '', $text);<br>
    <br>
    Hmm maybe the other way is simpler ?<br>
    <br>
  • Lenny 2005-08-08 22:24
    Anonymous:
    nice
    <br>
    <br>
    Wow, insightful and humorus!&nbsp; Thank you for sharing :)<br>
  • OmnipotentEntity 2005-08-08 22:47
    yes, Perl:<br>
    <br>
    $text =~ s/[!@\#\$%\^&amp;*\(\)-_+=]//;<br>
  • SerajewelKS 2005-08-08 22:56
    While this is ugly, it's faster than looping through an array. So
    either he's dumb, or this code runs so often that it warrants a little
    optimization.&nbsp; (Heh... optimization of VB/VBScript...)<br>
  • SerajewelKS 2005-08-08 22:58
    Anonymous:
    yes, Perl:<br>
    <br>
    $text =~ s/[!@\#\$%\^&amp;*\(\)-_+=]//;<br>
    <br>
    Or...<br>
    <br>
    $text =~ s/\W//g;<br>
  • OmnipotentEntity 2005-08-08 23:56
    umm... I wrote it to spec (I don't know if he wants to keep "s and :s
    and |s and such).  And that removes spaces too, though I admit to
    forgetting the global...  What you're looking for is:<br>
    <br>
    $text =~ s/[\W\S]//g;<br>
    <br>
    or perhaps<br>
    <br>
    $text =~ s/[?:\W\S]//g;<br>
    <br>
    if you have something in $1 that you want to keep.<br>
  • OmnipotentEntity 2005-08-08 23:58
    Oh yeah, and he wants to get rid of _s too, so<br>
    <br>
    $text =~ s/[?:\W\S_]//g;<br>
  • OmnipotentEntity 2005-08-09 00:13
    ... actually that just deletes every character in the string, or throw
    a syntax error because I'm confusing () with [] again.&nbsp; Perhaps I
    should start thinking about this shit before I post. ¬_¬<br>
    <br>
    What I meant to say is:<br>
    <br>
    $text =~ s/[^a-zA-Z0-9\s]//g;<br>
  • OmnipotentEntity 2005-08-09 00:17
    But all this is moot, because AFAIK VB only supports regular
    expressions in a convoluted, complicated way.&nbsp; And I promise to
    stop posting now.<br>
  • Ayende Rahien 2005-08-09 00:25
    SerajewelKS:
    While this is ugly, it's faster than looping through an array. So
    either he's dumb, or this code runs so often that it warrants a little
    optimization.&nbsp; (Heh... optimization of VB/VBScript...)<br>
    <br>
    <br>
    It's /creatainly/ not faster.<br>
    The replace is going to iterate the string per each symbol! Over &amp; over again.<br>
  • AC 2005-08-09 00:27
    what the fsck do you think the Replace() function does? VB compiles to
    native. 10+ function calls and 10+ variant allocs is faster than
    looping through an array? WTF? god explain that please<br>
  • AC 2005-08-09 00:30
    SerajewelKS:
    While this is ugly, it's faster than looping through an array. So
    either he's dumb, or this code runs so often that it warrants a little
    optimization.&nbsp; (Heh... optimization of VB/VBScript...)<br>
    <br>
    <br>
    argh i meant to quote this weenie...<br>
    <br>
    Replace() will of course have to loop through something... argh<br>
  • luis 2005-08-09 00:47
    Ayende Rahien:
    It's /creatainly/ not faster. The replace is going to iterate the string per each symbol! Over & over again.


    I hope you don't mean to imply it's slower. Let n be the length of the string, and m the number of distinct symbols. Then in one case you're looping m times over the list of symbols, and in each iteration, you do an inner loop over the length of the string (n), where you check if the current char is the current symbol, and replace it if it is. In the other case, you loop over each character of the string, and then for each symbol, you check if the current char is that symbol. In both cases, it's n*m. The real inefficiency probably is that the Replace() function used needs to do a lot of bookkeeping, either by allocating a new string for the result, or by shifting characters towards the beginning of the string when you delete one. (The fast thing to do is to allocate a new, mutable string, iterate over the source string, and for each character that's not being removed, append it to the new string...)
  • Drak 2005-08-09 01:11
    <P>
    Anonymous:
    (The fast thing to do is to allocate a new, mutable string, iterate over the source string, and for each character that's not being removed, append it to the new string...)
    </P>
    <P>&nbsp;</P>
    <P>And how is adding characters to a string in VB fast? It's almost the slowest operation possible [:P]. Maybe an array would do the job, 'join'ing it at&nbsp;the end. Anywho this person should be shot, because well.. do you know how many 'symbols' there are? He'd have been better off just copying letters to the target array or string.</P>
    <P>Drak</P>
  • Omnifarious 2005-08-09 01:25
    SerajewelKS:
    While this is ugly, it's faster than looping through an array. So
    either he's dumb, or this code runs so often that it warrants a little
    optimization.&nbsp; (Heh... optimization of VB/VBScript...)<br>
    <br>

    Well, that would be interesting test.&nbsp; Internally VB is going to
    implement each one of those Replace calls with a loop (though probably
    implemented in nice, fast C/C++ code) through the array.&nbsp; So all
    those nested Replace calls will eventually (as the level of nesting
    grows deeper and deeper) be slower than some code that can loop through
    the array just once.<br>
  • Michael Casadevall 2005-08-09 01:31
    It's burn in a way that is worse then table streching. I'm afraid to see the other half of the replacement query.
  • William 2005-08-09 02:52
    <P>nice...</P>
    <P>another WTF is that I cannot browse this post using FireFox 1.0.6 [*-)] I need to switch to IE in viewing it....</P>
  • mdecarle 2005-08-09 03:01
    <P>
    Omnifarious:
    Well, that would be interesting test.&nbsp; Internally VB is going to implement each one of those Replace calls with a loop (though probably implemented in nice, fast C/C++ code) through the array.&nbsp; So all those nested Replace calls will eventually (as the level of nesting grows deeper and deeper) be slower than some code that can loop through the array just once.<BR>
    I don't think the VB compiler will translate to C/C++ before it compiles it ...</P>
    <P>I've done regular expressions in VB6 and VBScript. 'Regex' is part of the "Scripting Runtime", and is used to interprete VBScript. It also has such interesting things as objects for files and folders (via the FileSystemObject). Most modern VB6 projects will have this DLL referenced anyway. So it is only a question of creating a object, and passing along the expression.</P>
  • MWTJ 2005-08-09 03:10
    Are VB strings mutable or immutable?&nbsp; If they're immutable, then
    this is allocating and GCing 14 strings every time it happens.&nbsp;
    It's
    certainly a WTF, more like, "dude, learn how to use the library" kind
    of WTF.&nbsp;
    It's certainly not an OMGWTF, like the false detector was.&nbsp; Still,
    it's great to see the lengths people will go to to avoid having to use
    convenient built-in language features like regexps.&nbsp; Scary to
    think what this programmer would do in Java.&nbsp; "I will abstain from
    using 94% of java.* packages."<br>
    <br>
    ----------------------<br>
    <a href="http://mwtj.com/">mobile search</a><br>
  • ammoQ 2005-08-09 03:12
    Without profiling, I would not be too sure this is slower than alternative implementations.<br>
    Depending on how you build it (RE would of course be the best way, but
    not every programming language supports them) your own implementation
    may be slower.<br>
    Let's say
    text="a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!"
    and lets assume the replace function is clever enough not allocate a
    new string if no replacement is actually made.<br>
    One alternative implementation would loop through the string, check
    each character and remove it if it is a symbol: text=left(text,
    i-1)&amp;mid(text,i+1)<br>
    This creates 3 new string objects for each "!"<br>
    Alternatively, you build a new string with all the characters which are not symbols:<br>
    newtext=newtext&amp;mid(text,i,1)<br>
    This creates 2 new string objects for each "a"<br>
    Chances are that both versions are slower than the original "WTF".<br>
    Anyway, chances are you will not notice the difference in real life.<br>
    At least you can say for sure that this implementation works. No doubt.<br>
    The alternatives with loops require more testing, because they are more complex.<br>
  • Masklinn 2005-08-09 03:36
    Anonymous:
    <p>nice...</p>
    <p>another WTF is that I cannot browse this post using FireFox 1.0.6 [*-)] I need to switch to IE in viewing it....</p>

    <p>Problem's yours, I browse TDWTF just fine with Firefox 1.0.6</p>
    <blockquote><p>Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Moonape/1.0.6</p></blockquote>
  • Bad Wolf 2005-08-09 04:38
    Anonymous:
    <p>nice...</p>
    <p>another WTF is that I cannot browse this post using FireFox 1.0.6 [*-)] I need to switch to IE in viewing it....</p>
    <br>
    <br>
    Hit refresh - worked for me.  Though the text then decided it was
    about 3 screens wide, so I had to do a lot of scrollbar work..<br>
  • DZ-Jay 2005-08-09 05:33
    OmnipotentEntity:
    ... actually that just deletes every character in the string, or throw
    a syntax error because I'm confusing () with [] again.&nbsp; Perhaps I
    should start thinking about this shit before I post. ¬_¬<br>
    <br>
    What I meant to say is:<br>
    <br>
    $text =~ s/[^a-zA-Z0-9\s]//g;<br>
    <br>
    <br>
    But that's mostly the same as \W, except that Perl takes the underscore as a "word character", so:<br>
    &nbsp;$text =~ s/[\W_]//go;<br>
    <br>
    &nbsp;&nbsp;&nbsp; -dZ.<br>
    <br>
  • DZ-Jay 2005-08-09 05:35
    OmnipotentEntity:
    But all this is moot, because AFAIK VB only supports regular
    expressions in a convoluted, complicated way.&nbsp; And I promise to
    stop posting now.<br>
    <br>
    <br>
    Actually, it supports it as an external Class, which is the way many
    other non-Perl languages do it.&nbsp; As far as I know, Perl is one of
    the few (the only) programming languages that integrate Regular
    Expressions into their core syntax.&nbsp; (Just like god intended
    RegExps to be.)<br>
    <br>
    &nbsp;&nbsp;&nbsp; -dZ.<br>
  • dhromed 2005-08-09 05:48
    DZ-Jay:
    As far as I know, Perl is one of
    the few (the only) programming languages that integrate Regular
    Expressions into their core syntax.&nbsp; (Just like god intended
    RegExps to be.)<br>
    <br>
    &nbsp;&nbsp;&nbsp; -dZ.<br>
    <br>
    <br>
    I thought, correct me if I'm wrong, that Perl does not so much support
    regular expressions as much as it is a programming language that
    evolved from regular expressions. Which is arguably why so many
    C/ECMA/Java coders think a slab of Perl is alien-sp33k. It's like
    extensive regex with keywords and function names strewn in, instead of
    textual code with a regex here and there. :)<br>
  • AndrewVos (argh im not logged in again) 2005-08-09 06:09
    <P>mmm, in Vb.Net it woulda looked soo much cooler :&gt;</P>
    <P>&nbsp;= .Replace("%","").Replace("^") (repeat 256 times)</P>
    <P>&nbsp;</P>
  • diGriz 2005-08-09 06:09
    *lol* Just great. YMMD!<br>
  • SteveM 2005-08-09 07:04
    Anonymous:
    <p>mmm, in Vb.Net it woulda looked soo much cooler :&gt;</p>
    <p>&nbsp;= .Replace("%","").Replace("^") (repeat 256 times)</p>
    <br>
    <br>
    Er, in Vb.net it wouldn't look too bad at all actually - <br>

    <br>

    strOut = Regex.Replace(strIn, "[^\w\.@-]", "")<br>
    <br>
    (BTW ignore the RegEx I quote, but that's the syntax)<br>
  • Richy 2005-08-09 07:14
    <P>
    paranoidgeek:
    In PHP :<BR><BR>$text = preg_replace("/[!@#$%^&amp;\*\(\)\-_\+=]/", '', $text);<BR><BR>Hmm maybe the other way is simpler ?<BR><BR>
    </P>
    <P>&nbsp;</P>
    <P>$text = preg_replace('#[\W_]#', '', $text);</P>
    <P>Much nicer...</P>
  • DZ-Jay 2005-08-09 08:25
    dhromed:
    <br>
    I thought, correct me if I'm wrong, that Perl does not so much support
    regular expressions as much as it is a programming language that
    evolved from regular expressions.<br>
    <br>
    <br>
    You're wrong.&nbsp; Perl was designed from the very beginning as a
    programming language, with the built-in feature of manipulating
    text.&nbsp; It borrowed heavily from text-manipulation tools (awk, for
    example) for it syntax and core functions, since those tools were very
    powerful at what they did, and their syntax and mode of operation was
    well known and understood.&nbsp; Because of this, syntax for performing
    operations on Regular Expressions is built into the language itself, as
    opposed to having to call an external function or instantiate an
    object, like other programming languages require.&nbsp; Of course, this
    will look alien to anybody not familiar with its syntax -- just like
    Japanese and Korean manuscripts look very alien to those who do not
    understand it (like me!).&nbsp; This does not mean that it is
    inherently more complex or harder to learn than any other language --
    after all, little Japanese kids read and write their language very
    naturally at an early age, just like Americans do with English.<br>
    <br>
    &nbsp;&nbsp;&nbsp; dZ.<br>
    <br>
  • Jason 2005-08-09 08:52
    Some of these responses are a WTF. The regex /[!@#$%^&amp;*()_+=-]//g would suffice to do the replacement, assuming the "programmer" intended to ignore other puncuation. No need to backslash escape the special characters in the regex, just put the hyphen at the end. And it would run in O(n), not O(m*n), because the regex uses a table lookup, not a comparison against each character. Though there would be some overhead from compiling the regex.
  • MORB 2005-08-09 08:56
    Anonymous:

    <br>
    Hit refresh - worked for me.&nbsp; Though the text then decided it was
    about 3 screens wide, so I had to do a lot of scrollbar work..<br>
    <br>
    <br>
    That's because the code is all on one line, so it's
    actually a WTF from the original code.<br>
  • tufty 2005-08-09 09:05
    > just like Americans do with English.

    Heh. You misspelt "American"

    Simon

    You're right about perl, though :D
  • cm5400 2005-08-09 09:14
    <P>
    MWTJ:
    Are VB strings mutable or immutable?&nbsp; If they're immutable, then this is allocating and GCing 14 strings every time it happens.&nbsp; It's certainly a WTF, more like, "dude, learn how to use the library" kind of WTF.&nbsp; It's certainly not an OMGWTF, like the false detector was.&nbsp; Still, it's great to see the lengths people will go to to avoid having to use convenient built-in language features like regexps.&nbsp; Scary to think what this programmer would do in Java.&nbsp; "I will abstain from using 94% of java.* packages."<BR>
    </P>
    <P>VB Strings are immutable.&nbsp; It will create a new string for every change to it.</P>
  • travisowens 2005-08-09 09:56
    SerajewelKS:
    ... or this code runs so often that it warrants a little optimization.&nbsp; (Heh... optimization of VB/VBScript...)
    Well if it is VB/VBScript then you need all the potimizing you can get!
  • Paul 2005-08-09 09:56
    OmnipotentEntity:
    ... actually that just deletes every character in the string, or throw
    a syntax error because I'm confusing () with [] again.&nbsp; Perhaps I
    should start thinking about this shit before I post. ¬_¬<br>
    <br>
    What I meant to say is:<br>
    <br>
    $text =~ s/[^a-zA-Z0-9\s]//g;<br>
    <br>
    <br>
    This is, arguably, the funniest fibre in this thread. Thank you for the laugh and the mini WTF.<br>
  • travisowens 2005-08-09 10:01
    Anonymous:
    another WTF is that I cannot browse this post using FireFox 1.0.6 [*-)] I need to switch to IE in viewing it....
    The whole DailyWTF site is a WTF, we can't edit our posts and setting fonts attributes in the post editor is flakely.
  • phred 2005-08-09 10:08
    <P>Where I work we have to use that stuff, as regular expressions&nbsp;are forbidden, we aren't allowed to install&nbsp;any regular expression libraries&nbsp;as&nbsp;the GPL&nbsp;will corrupt our proprietory applications and open us up to lawsuits.</P>
    <P>But its not too bad as the code tends to be self documenting, unlike regular expressions which frequently have shell code embedded which can allow breakins to occur, this happens with perl too.</P>
  • dubwai 2005-08-09 10:28
    <P>
    ammoQ:
    Without profiling, I would not be too sure this is slower than alternative implementations.<BR>Depending on how you build it (RE would of course be the best way, but not every programming language supports them) your own implementation may be slower.<BR>Let's say text="a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!" and lets assume the replace function is clever enough not allocate a new string if no replacement is actually made.<BR>One alternative implementation would loop through the string, check each character and remove it if it is a symbol: text=left(text, i-1)&amp;mid(text,i+1)<BR>This creates 3 new string objects for each "!"<BR>Alternatively, you build a new string with all the characters which are not symbols:<BR>newtext=newtext&amp;mid(text,i,1)<BR>This creates 2 new string objects for each "a"<BR>Chances are that both versions are slower than the original "WTF".<BR>Anyway, chances are you will not notice the difference in real life.<BR>At least you can say for sure that this implementation works. No doubt.<BR>The alternatives with loops require more testing, because they are more complex.<BR>
    </P>
    <P>Why would one do any of these?&nbsp;&nbsp;Is there no mutable String type in VB or something? Can you not create Strings from arrays of characters?</P>
  • phred 2005-08-09 10:39
    dubwai:

    <P>
    ammoQ:
    Without profiling, I would not be too sure this is slower than alternative implementations.<BR>Depending on how you build it (RE would of course be the best way, but not every programming language supports them) your own implementation may be slower.<BR>Let's say text="a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!a!" and lets assume the replace function is clever enough not allocate a new string if no replacement is actually made.<BR>One alternative implementation would loop through the string, check each character and remove it if it is a symbol: text=left(text, i-1)&amp;mid(text,i+1)<BR>This creates 3 new string objects for each "!"<BR>Alternatively, you build a new string with all the characters which are not symbols:<BR>newtext=newtext&amp;mid(text,i,1)<BR>This creates 2 new string objects for each "a"<BR>Chances are that both versions are slower than the original "WTF".<BR>Anyway, chances are you will not notice the difference in real life.<BR>At least you can say for sure that this implementation works. No doubt.<BR>The alternatives with loops require more testing, because they are more complex.<BR>
    </P>
    <P>Why would one do any of these?&nbsp;&nbsp;Is there no mutable String type in VB or something? Can you not create Strings from arrays of characters?</P>
    <P>
    </P>
    <P>toreplace = "!*/\&amp;^%$#@"</P>
    <P>for i = 1 to len(toreplace)</P>
    <P>&nbsp; text = replace(text,mid$(toreplace,i,1),"")</P>
    <P>next i</P>
    <P>I'd do something like that, although it doesn't save on the string copying.</P>
  • Mung Kee 2005-08-09 10:44
    You know it's a WTF when you can only see half of it in your browser window.<br>
  • Zathrus 2005-08-09 10:55
    Anonymous:
    <p>Where I work we have to use that stuff, as
    regular expressions&nbsp;are forbidden, we aren't allowed to
    install&nbsp;any regular expression libraries&nbsp;as&nbsp;the
    GPL&nbsp;will corrupt our proprietory applications and open us up to
    lawsuits.<br>
    <br>
    </p>
    <p>I'm sorry you work in such an utterly clue-free workplace. There are
    a number of non-GPL licensed RegEx libraries for most languages (those
    that don't just have them built-in that is).<br>
    </p>

    <p>
    Anonymous:
    <br>
    But its not too bad as the code tends to be self documenting, unlike
    regular expressions which frequently have shell code embedded which can
    allow breakins to occur, this happens with perl too.</p>
    <br>
    <br>
    Oh, nevermind. You deserve to work there.<br>
  • joodie 2005-08-09 11:07
    Anonymous:
    Anonymous:
    <p>Where I work we have to use that stuff, as
    regular expressions&nbsp;are forbidden, we aren't allowed to
    install&nbsp;any regular expression libraries&nbsp;as&nbsp;the
    GPL&nbsp;will corrupt our proprietory applications and open us up to
    lawsuits.<br>
    <br>
    </p>
    <p>I'm sorry you work in such an utterly clue-free workplace. There are
    a number of non-GPL licensed RegEx libraries for most languages (those
    that don't just have them built-in that is).<br>
    </p>

    <p>
    Anonymous:
    <br>
    But its not too bad as the code tends to be self documenting, unlike
    regular expressions which frequently have shell code embedded which can
    allow breakins to occur, this happens with perl too.</p>
    <br>
    <br>
    Oh, nevermind. You deserve to work there.<br>
    <br>
    <br>
    Just ignore the troll.<br>
    <br>
    <br>
    <br>
  • JThelen 2005-08-09 11:19
    travisowens:
    Anonymous:
    another WTF is that I
    cannot browse this post using FireFox 1.0.6 [*-)] I need to switch to
    IE in viewing it....
    The whole DailyWTF site is a WTF, we can't
    edit our posts and setting fonts attributes in the post editor is
    flakely.
    <br>
    <br>
    IMO, not being able to edit your posts is no big loss;&nbsp; it just
    forces you to proofread what you're posting.&nbsp; I go to enough
    no-edit forums that I don't miss it.<br>
    <br>
    As to the 'whole site' being one big WTF, the only real issue is the
    javascript page browsing.&nbsp; Everything else is sporadic enough that
    it qualifies as a PEBKAC error, not a problem with the site itself,
    unless you want to get into how the site displays in Opera or
    Safari.&nbsp; That's just a standard MS WTF.<br>
  • Mung Kee 2005-08-09 11:39
    JThelen:
    As to the 'whole site' being one big WTF, the only real issue is the
    javascript page browsing.
    <br>
    <br>
    I agree.&nbsp; Lose the form post in the paginator.&nbsp; You can't refresh without choosing to repost the data.<br>
  • Manni 2005-08-09 12:44
    <P>I hate to burst everyone's bubble (actually I love to do that), but this is one of the best ways to do it in VB. I wrote a little test app that did the RegExp solution and it averaged 0.5 - 0.6 ms per execution. The replace version above ran in 0.1 ms. It may not be pretty, but it's much faster.</P>
    <P>I know some of you will complain that it's VBs fault that it wastes overhead and time instantiating the RegExp library and other "better" languages have it built-in. Who cares? We're talking about losing 0.4 ms of time per execution. So VBs strings are immutable. Just about any program written these days uses a few MB of memory at the least, you're talking about being wasteful because it uses a few more bytes to create new strings on function calls.&nbsp;At what point does it become wasteful to spend this much time devising&nbsp;a barely noticeable performance improvement? </P>
  • Mung Kee 2005-08-09 13:07
    Manni:
    At what point does it become wasteful to spend this
    much time devising&nbsp;a barely noticeable performance improvement?
    <br>
    At the point that you decided to use VB.<br>
    <br>
    Disclaimer: I'm not a VB-hater.&nbsp; It's just no Porsche.<br>
  • Manni 2005-08-09 13:18
    <P>
    Mung Kee:
    Manni:
    At what point does it become wasteful to spend this much time devising&nbsp;a barely noticeable performance improvement?
    <BR>At the point that you decided to use VB.<BR><BR>Disclaimer: I'm not a VB-hater.&nbsp; It's just no Porsche.<BR>
    </P>
    <P>If my shitty car gets up to 60 mph in the same time&nbsp;a Porsche can get to 130 mph, I call that&nbsp;a significant difference. If you think you can save a few hundreths of a millisecond by using one language as opposed to another, then I'm not convinced your language is better.</P>
    <P>And by the way, I was looking for a real answer, not a smart-assed comment that provided no further insight about when the coding time investment does not yield appropriate performance returns.</P>
    <P>"Ha ha VB sux"...yeah, thanks for contributing.</P>
  • Humble merc coder 2005-08-09 13:37
    <span style="font-style: italic;" id="_ctl0_PostForm_Reply">
    umm... I wrote it to spec<br>
    <br>
    </span><span id="_ctl0_PostForm_Reply">...And thus begins many a sad tale.</span><span style="font-style: italic;" id="_ctl0_PostForm_Reply"><br>
    </span>
  • David 2005-08-09 13:41
    <P>Just wondering, what expression did you&nbsp;test with?&nbsp; I wrote a quick app in C++&nbsp;to remove unwanted characters and I wanted to compare speeds, but obviously comparing my speed to yours is pointless without knowing the expression you used to test it.&nbsp; </P>
  • JThelen 2005-08-09 13:50
    Manni:
    <p>
    Mung Kee:
    Manni:
    At
    what point does it become wasteful to spend this much time
    devising&nbsp;a barely noticeable performance improvement?
    <br>At the point that you decided to use VB.<br><br>Disclaimer: I'm not a VB-hater.&nbsp; It's just no Porsche.<br>
    </p>
    <p>If my shitty car gets up to 60 mph in the same time&nbsp;a Porsche
    can get to 130 mph, I call that&nbsp;a significant difference. If you
    think you can save a few hundreths of a millisecond by using one
    language as opposed to another, then I'm not convinced your language is
    better.</p>
    <p>And by the way, I was looking for a real answer, not a smart-assed
    comment that provided no further insight about when the coding time
    investment does not yield appropriate performance returns.</p>
    <p>"Ha ha VB sux"...yeah, thanks for contributing.</p>
    <br>
    <br>
    Jesus, when did you turn into a proVB troll?&nbsp; <br>
    <br>
    If the fact of the matter is that VB sucks for something, and coding
    something proper results in slowdown, then it sucks, end of
    story.&nbsp; The fact that you have to write crap like this instead of
    using a properly coded solution speaks volumes in and of itself.&nbsp; <br>
    <br>
    Noone here is saying 'ha ha VB sux' like you seem to be insinuating in
    every VB WTF of late, but if the best way to do something is absolute
    shit, then buck up and deal with the fact that your apparently beloved
    VB requires you to write pisspoor code for optimal results.<br>
  • Mung Kee 2005-08-09 14:04
    Manni:
    <br>
    And by the way, I was looking for a real answer, not a smart-assed
    comment that provided no further insight about when the coding time
    investment does not yield appropriate performance returns.
    <p>"Ha ha VB sux"...yeah, thanks for contributing.</p>
    <br>
    <br>
    Asshat, you, me and the rest of the readers know your question was
    rhetorical, so when you say you were looking for a real answer, I say
    bullshit.&nbsp; And as Jake implied, take the <span id="PostFlatView">three
    or four minutes to learn RegExp.&nbsp; It keeps on giving (though it's
    likely out of the realm of the average VB evangelist).&nbsp; For the
    record, I never said it "sux" and don't believe it does, but if you
    believe that VB isn't one of the slowest performing of the mainstream
    languages then you have tunnel-vision.<br>
    </span>
  • DZ-Jay 2005-08-09 14:09
    Mung Kee:
    Manni:
    <br>
    And by the way, I was looking for a real answer, not a smart-assed
    comment that provided no further insight about when the coding time
    investment does not yield appropriate performance returns.
    <p>"Ha ha VB sux"...yeah, thanks for contributing.</p>
    <br>
    <br>
    Asshat, you, me and the rest of the readers know your question was
    rhetorical, so when you say you were looking for a real answer, I say
    bullshit.&nbsp; And as Jake implied, take the <span id="PostFlatView">three
    or four minutes to learn RegExp.&nbsp; It keeps on giving (though it's
    likely out of the realm of the average VB evangelist).&nbsp; For the
    record, I never said it "sux" and don't believe it does, but if you
    believe that VB isn't one of the slowest performing of the mainstream
    languages then you have tunnel-vision.<br>
    </span>
    <br>
    <br>
    (Sing to the tune of Band-Aid)<br>
    <span style="font-style: italic;">Feed the Troooooooooolls,</span><br style="font-style: italic;">
    <span style="font-style: italic;">Let them know that VB really sux...</span><br>
    <br>
    &nbsp;&nbsp;&nbsp; -dZ.<br>
    <br>
  • PstScrpt 2005-08-09 15:23
    <P>
    dubwai:
    </P>
    <P>Why would one do any of these?&nbsp;&nbsp;Is there no mutable String type in VB or something? Can you not create Strings from arrays of characters?
    </P>
    <P>No, there's no mutable string type (at least in QuickBasic through VB6).&nbsp; </P>
    <P>To create a string from an array of characters, the language would have to have a character type, which it doesn't.&nbsp; When you need to store a character, you use a string that just happens to be really short.</P>
  • Special 2005-08-09 15:30
    <DIV>
    DZ-Jay:
    As far as I know, Perl is one of the few (the only) programming languages that integrate Regular Expressions into their core syntax.&nbsp; (Just like god intended RegExps to be.)
    </DIV>
    <DIV>&nbsp;</DIV>
    <DIV>The only language more hated around here than VB: JavaScript has built in regex syntax.</DIV>
  • Thomas G 2005-08-09 15:55
    JThelen:

    unless you want to get into how the site displays in Opera or
    Safari.  That's just a standard MS WTF.<br>


    Eh? What's wrong with how it looks in Opera? I'm using Opera right now and it looks identical in IE.
  • Hank Miller 2005-08-09 15:59
    Manni:

    <p>If my shitty car gets up to 60 mph in the same time a Porsche
    can get to 130 mph, I call that a significant difference. If you
    think you can save a few hundreths of a millisecond by using one
    language as opposed to another, then I'm not convinced your language is
    better.</p>
    <br>
    <br>
    I'm convinced that knowing how to program is worth more than any
    language.   Judging from this site, I can do better at visual
    basic this afternoon than many people who have been doing VB for years,
    even though everything I know about VB I learned from their examples
    here.<br>
    <br>
    My Geo Metro often beats Porsche's to freeway speed, entering a busy
    freeway, and it isn't even running on all cylinders.   I'm
    pretty sure this is a reflection on how bad many Porsche drivers are,
    not my skill, or my car's abilities.    <br>
    <br>
    A good driver doesn't need a good car, and a good programmer doesn't
    need a good language.   However given a choice the good
    programmer and driver will prefer the better language/car, but they can
    get results from a lot less.    (In my case it is just
    hard to argue with 45mpg when you drive > 100 miles a day)<br>
    <br>
    A bad driver cannot get good results from a good car, and a bad programmer will not get good results from a good language.<br>
  • whojoedaddy 2005-08-09 17:02
    <P>
    Anonymous:
    <SPAN id=_ctl0_PostForm_Reply style="FONT-STYLE: italic"> umm... I wrote it to spec<BR><BR></SPAN><SPAN id=_ctl0_PostForm_Reply>...And thus begins many a sad tale.</SPAN><SPAN id=_ctl0_PostForm_Reply style="FONT-STYLE: italic"><BR></SPAN>
    </P>
    <P>&nbsp;</P>
    <P>So true it hurts.</P>
  • zorro 2005-08-09 23:47
    vb mimicking lisp, wtf!<br>
  • zorro 2005-08-09 23:51
    Anonymous:
    Manni:

    <p>If my shitty car gets up to 60 mph in the same time a Porsche
    can get to 130 mph, I call that a significant difference. If you
    think you can save a few hundreths of a millisecond by using one
    language as opposed to another, then I'm not convinced your language is
    better.</p>
    <br>
    <br>
    I'm convinced that knowing how to program is worth more than any
    language.   Judging from this site, I can do better at visual
    basic this afternoon than many people who have been doing VB for years,
    even though everything I know about VB I learned from their examples
    here.<br>
    <br>
    My Geo Metro often beats Porsche's to freeway speed, entering a busy
    freeway, and it isn't even running on all cylinders.   I'm
    pretty sure this is a reflection on how bad many Porsche drivers are,
    not my skill, or my car's abilities.    <br>
    <br>
    A good driver doesn't need a good car, and a good programmer doesn't
    need a good language.   However given a choice the good
    programmer and driver will prefer the better language/car, but they can
    get results from a lot less.    (In my case it is just
    hard to argue with 45mpg when you drive > 100 miles a day)<br>
    <br>
    A bad driver cannot get good results from a good car, and a bad programmer will not get good results from a good language.<br>
    <br>
    <br>
    is there a daily wtf analogy dot com somewhere? <br>
  • RayS 2005-08-10 06:44
    GAAAAAAAAAAAH!<br>
    <br>
    Strings in VB6 are NOT immutable. Where do people get this idea?<br>
    <br>
    example:<br>
    a = "Foo"<br>
    mid$(a,2,1) = "*"<br>
    debug.Print a<br>
    <br>
    Result:<br>
    <span style="font-weight: bold;">"F*o"</span><br>
    <br>
    Strings in VB6 can be changed, they are not immutable.<br>
  • PstScrpt 2005-08-10 07:32
    RayS:
    GAAAAAAAAAAAH!<br>
    <br>
    Strings in VB6 are NOT immutable. Where do people get this idea?<br>
    <br>
    example:<br>
    a = "Foo"<br>
    mid$(a,2,1) = "*"<br>
    debug.Print a<br>
    <br>
    Result:<br>
    <span style="font-weight: bold;">"F*o"</span><br>
    <br>
    Strings in VB6 can be changed, they are not immutable.<br>
    <br>
    <br>
    Alright, yes, I forgot about that.&nbsp; That only works, though, when
    the length of the string isn't going to be changing, which is pretty
    rare.<br>
  • Suomynona 2005-08-10 08:16
    JThelen:
    <br>
    As to the 'whole site' being one big WTF, the only real issue is the
    javascript page browsing.&nbsp; Everything else is sporadic enough that
    it qualifies as a PEBKAC error, not a problem with the site itself,
    unless you want to get into how the site displays in Opera or
    Safari.&nbsp; That's just a standard MS WTF.<br>
    <br>
    <br>
    <a href="/forums/39559/ShowPost.aspx">Pityful apologies</a><br>
    <br>
    Post #121. Sorry for not linking to the post in question - that doesn't
    seem possible, either. I'm now entering the <span style="text-decoration: line-through;">second</span> third captcha so I can
    post.<br>
    <br>
  • tufty 2005-08-10 09:10
    > I'm now entering the second third captcha so I can post.

    It's not just you. If you use an browser / OS combination that doesn't throw up the Javascript editor, you will find a complete inability to edit as anything other than plain text, bbcode tags will not work, previewing will appear to work, and then post vast amounts of unreadable htmlised shite, etc.

    the captcha stuff is deeply irritating for unregistered users.

    On the whole, this forum software is under-featured, under-developed, and basically just plain sucks.

    It says something for the quality of the WTFs posted here that people ever bother coming back.

    simon
  • joost 2005-08-10 10:01
    Actually I find there's something beautifully recursive about the Daily WTF's forum software being the way it is.<br>
  • JThelen 2005-08-10 10:19
    tufty:
    &gt; I'm now entering the second third captcha so I
    can post.
    It's not just you. If you use an browser / OS combination that doesn't
    throw up the Javascript editor, you will find a complete inability to
    edit as anything other than plain text, bbcode tags will not work,
    previewing will appear to work, and then post vast amounts of
    unreadable htmlised shite, etc.
    the captcha stuff is deeply irritating for unregistered users.
    On the whole, this forum software is under-featured, under-developed,
    and basically just plain sucks.
    It says something for the quality of the WTFs posted here that people
    ever bother coming back.
    simon
    <br>
    <br>
    Yes, the Captchas are a PITA.&nbsp; Registering will get you around
    them, but for those who'd prefer to stay anonymous and troll more than
    contribute, I say fuck em.<br>
    <br>
    While the forum software has less features than you'd find in phpBB or
    some of the other forum software out there, it's also far less prone to
    being hacked, as far as I can tell.&nbsp; <br>
    <br>
    Overall, I'm not a huge fan of it;&nbsp; I think Alex would have done
    himself(and all of us, for that matter) a huge favor if he'd taken
    Slashcode and modified that to meet his own ends. <br>
  • Manni 2005-08-10 12:25
    Mung Kee:
    Manni:
    <BR>And by the way, I was looking for a real answer, not a smart-assed comment that provided no further insight about when the coding time investment does not yield appropriate performance returns.
    <P>"Ha ha VB sux"...yeah, thanks for contributing.</P>
    <P>
    </P>
    <P>Asshat, you, me and the rest of the readers know your question was rhetorical, so when you say you were looking for a real answer, I say bullshit.&nbsp; And as Jake implied, take the <SPAN id=PostFlatView>three or four minutes to learn RegExp.&nbsp; It keeps on giving (though it's likely out of the realm of the average VB evangelist).&nbsp; For the record, I never said it "sux" and don't believe it does, but if you believe that VB isn't one of the slowest performing of the mainstream languages then you have tunnel-vision.<BR></SPAN>
    </P>
    <P>Wow I didn't expect such an angry response from so many people.</P>
    <P>Mung Kee: I thought I was clear with my point that I did try RegExp, and it was a slower solution. It's certainly prettier to look at code-wise, but I'm not about to tell my users that they have to deal with slower software because I had to make the code look nice. I totally agree that VB produces probably the slowest performing compiled programs. However, in my line of work, it's not processing speed that is the biggest factor, it's development time.</P>
    <P>I work with seasoned C++/C# programmers, and if we start the same task in our language of choice, it's guaranteed I'll finish way ahead of them. Their software will run a few seconds faster because the language is better optimized, but no one will notice that if they have to wait hours or days longer for the code to be finished.</P>
    <P>David: The expression I tested with was with the RegExp object's Replace function using "[a-zA-Z0-9]".</P>
    <P>JThelen: I didn't realize I was trolling, I thought I was just trying to make the same point that Hank Miller eloquently stated: any language is good in the right hands, and any language can be an atrocity in the wrong ones.</P>
  • Mike Labosh 2005-08-15 16:30
    <P>*They made me&nbsp;add this update* to a stored procedure (after much protest and many meetings):</P><FONT size=1>
    <P></FONT><FONT color=#008000><FONT face="Courier New" size=2>-- Save yourself the trouble and don't even ask. SHEESH!</FONT></P></FONT>
    <P><FONT size=2><FONT face="Courier New"><FONT color=#0000ff>UPDATE </FONT>SampleSourceArchive <FONT color=#0000ff>WITH </FONT>(<FONT color=#0000ff>ROWLOCK</FONT></FONT><FONT face="Courier New">)</FONT></FONT></P>
    <P><FONT size=2><FONT face="Courier New"><FONT color=#0000ff>SET </FONT>CompanyName = <FONT color=#0000ff>LTRIM</FONT>(<FONT color=#0000ff>RTRIM</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>ISNULL</FONT>(CompanyName, ''), <FONT color=#0000ff>CHAR</FONT>(10), ''), <FONT color=#0000ff>CHAR</FONT>(13), ''), <FONT color=#0000ff>CHAR</FONT>(34), ''), <FONT color=#0000ff>CHAR</FONT>(145), ''), <FONT color=#0000ff>CHAR</FONT>(146), ''), <FONT color=#0000ff>CHAR</FONT>(147), ''), <FONT color=#0000ff>CHAR</FONT></FONT><FONT face="Courier New">(148), ''))),</FONT></FONT></P>
    <P><FONT size=2><FONT face="Courier New">CompanyPhoneArea = </FONT><FONT face="Courier New"><FONT color=#0000ff>LTRIM</FONT>(<FONT color=#0000ff>RTRIM</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>ISNULL</FONT>(CompanyPhoneArea, ''), <FONT color=#0000ff>CHAR</FONT>(10), ''), <FONT color=#0000ff>CHAR</FONT>(13), ''), <FONT color=#0000ff>CHAR</FONT>(34), ''), <FONT color=#0000ff>CHAR</FONT>(145), ''), <FONT color=#0000ff>CHAR</FONT>(146), ''), <FONT color=#0000ff>CHAR</FONT>(147), ''), <FONT color=#0000ff>CHAR</FONT></FONT><FONT face="Courier New">(148), ''))),</FONT></FONT></P>
    <P><FONT size=2><FONT face="Courier New">CompanyPhoneNumber = </FONT><FONT face="Courier New"><FONT color=#0000ff>LTRIM</FONT>(<FONT color=#0000ff>RTRIM</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>ISNULL</FONT>(CompanyPhoneNumber, ''), <FONT color=#0000ff>CHAR</FONT>(10), ''), <FONT color=#0000ff>CHAR</FONT>(13), ''), <FONT color=#0000ff>CHAR</FONT>(34), ''), <FONT color=#0000ff>CHAR</FONT>(145), ''), <FONT color=#0000ff>CHAR</FONT>(146), ''), <FONT color=#0000ff>CHAR</FONT>(147), ''), <FONT color=#0000ff>CHAR</FONT></FONT><FONT face="Courier New">(148), ''))),</FONT></FONT></P>
    <P><FONT size=2><FONT face="Courier New">CompanyAddress1 = </FONT><FONT face="Courier New"><FONT color=#0000ff>LTRIM</FONT>(<FONT color=#0000ff>RTRIM</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>ISNULL</FONT>(CompanyAddress1, ''), <FONT color=#0000ff>CHAR</FONT>(10), ''), <FONT color=#0000ff>CHAR</FONT>(13), ''), <FONT color=#0000ff>CHAR</FONT>(34), ''), <FONT color=#0000ff>CHAR</FONT>(145), ''), <FONT color=#0000ff>CHAR</FONT>(146), ''), <FONT color=#0000ff>CHAR</FONT>(147), ''), <FONT color=#0000ff>CHAR</FONT></FONT><FONT face="Courier New">(148), ''))),</FONT></FONT></P>
    <P><FONT size=2><FONT face="Courier New">CompanyAddress2 = </FONT><FONT face="Courier New"><FONT color=#0000ff>LTRIM</FONT>(<FONT color=#0000ff>RTRIM</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>ISNULL</FONT>(CompanyAddress2, ''), <FONT color=#0000ff>CHAR</FONT>(10), ''), <FONT color=#0000ff>CHAR</FONT>(13), ''), <FONT color=#0000ff>CHAR</FONT>(34), ''), <FONT color=#0000ff>CHAR</FONT>(145), ''), <FONT color=#0000ff>CHAR</FONT>(146), ''), <FONT color=#0000ff>CHAR</FONT>(147), ''), <FONT color=#0000ff>CHAR</FONT></FONT><FONT face="Courier New">(148), ''))),</FONT></FONT></P>
    <P><FONT size=2><FONT face="Courier New">CompanyAddress3 = </FONT><FONT face="Courier New"><FONT color=#0000ff>LTRIM</FONT>(<FONT color=#0000ff>RTRIM</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>ISNULL</FONT>(CompanyAddress3, ''), <FONT color=#0000ff>CHAR</FONT>(10), ''), <FONT color=#0000ff>CHAR</FONT>(13), ''), <FONT color=#0000ff>CHAR</FONT>(34), ''), <FONT color=#0000ff>CHAR</FONT>(145), ''), <FONT color=#0000ff>CHAR</FONT>(146), ''), <FONT color=#0000ff>CHAR</FONT>(147), ''), <FONT color=#0000ff>CHAR</FONT></FONT><FONT face="Courier New">(148), ''))),</FONT></FONT></P>
    <P><FONT size=2><FONT face="Courier New">City = </FONT><FONT face="Courier New"><FONT color=#0000ff>LTRIM</FONT>(<FONT color=#0000ff>RTRIM</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>ISNULL</FONT>(City, ''), <FONT color=#0000ff>CHAR</FONT>(10), ''), <FONT color=#0000ff>CHAR</FONT>(13), ''), <FONT color=#0000ff>CHAR</FONT>(34), ''), <FONT color=#0000ff>CHAR</FONT>(145), ''), <FONT color=#0000ff>CHAR</FONT>(146), ''), <FONT color=#0000ff>CHAR</FONT>(147), ''), <FONT color=#0000ff>CHAR</FONT></FONT><FONT face="Courier New">(148), ''))),</FONT></FONT></P>
    <P><FONT size=2><FONT face="Courier New">StateProvince = </FONT><FONT face="Courier New"><FONT color=#0000ff>LTRIM</FONT>(<FONT color=#0000ff>RTRIM</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>ISNULL</FONT>(StateProvince, ''), <FONT color=#0000ff>CHAR</FONT>(10), ''), <FONT color=#0000ff>CHAR</FONT>(13), ''), <FONT color=#0000ff>CHAR</FONT>(34), ''), <FONT color=#0000ff>CHAR</FONT>(145), ''), <FONT color=#0000ff>CHAR</FONT>(146), ''), <FONT color=#0000ff>CHAR</FONT>(147), ''), <FONT color=#0000ff>CHAR</FONT></FONT><FONT face="Courier New">(148), ''))),</FONT></FONT></P>
    <P><FONT size=2><FONT face="Courier New">PostalCode = </FONT><FONT face="Courier New"><FONT color=#0000ff>LTRIM</FONT>(<FONT color=#0000ff>RTRIM</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>ISNULL</FONT>(PostalCode, ''), <FONT color=#0000ff>CHAR</FONT>(10), ''), <FONT color=#0000ff>CHAR</FONT>(13), ''), <FONT color=#0000ff>CHAR</FONT>(34), ''), <FONT color=#0000ff>CHAR</FONT>(145), ''), <FONT color=#0000ff>CHAR</FONT>(146), ''), <FONT color=#0000ff>CHAR</FONT>(147), ''), <FONT color=#0000ff>CHAR</FONT></FONT><FONT face="Courier New">(148), ''))),</FONT></FONT></P>
    <P><FONT size=2><FONT face="Courier New">Country = </FONT><FONT face="Courier New"><FONT color=#0000ff>LTRIM</FONT>(<FONT color=#0000ff>RTRIM</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>ISNULL</FONT>(Country, ''), <FONT color=#0000ff>CHAR</FONT>(10), ''), <FONT color=#0000ff>CHAR</FONT>(13), ''), <FONT color=#0000ff>CHAR</FONT>(34), ''), <FONT color=#0000ff>CHAR</FONT>(145), ''), <FONT color=#0000ff>CHAR</FONT>(146), ''), <FONT color=#0000ff>CHAR</FONT>(147), ''), <FONT color=#0000ff>CHAR</FONT></FONT><FONT face="Courier New">(148), ''))),</FONT></FONT></P>
    <P><FONT size=2><FONT face="Courier New">SubIndustryCode = </FONT><FONT face="Courier New"><FONT color=#0000ff>LTRIM</FONT>(<FONT color=#0000ff>RTRIM</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>ISNULL</FONT>(SubIndustryCode, ''), <FONT color=#0000ff>CHAR</FONT>(10), ''), <FONT color=#0000ff>CHAR</FONT>(13), ''), <FONT color=#0000ff>CHAR</FONT>(34), ''), <FONT color=#0000ff>CHAR</FONT>(145), ''), <FONT color=#0000ff>CHAR</FONT>(146), ''), <FONT color=#0000ff>CHAR</FONT>(147), ''), <FONT color=#0000ff>CHAR</FONT></FONT><FONT face="Courier New">(148), ''))),</FONT></FONT></P>
    <P><FONT size=2><FONT face="Courier New">SicCode = </FONT><FONT face="Courier New"><FONT color=#0000ff>LTRIM</FONT>(<FONT color=#0000ff>RTRIM</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>ISNULL</FONT>(SicCode, ''), <FONT color=#0000ff>CHAR</FONT>(10), ''), <FONT color=#0000ff>CHAR</FONT>(13), ''), <FONT color=#0000ff>CHAR</FONT>(34), ''), <FONT color=#0000ff>CHAR</FONT>(145), ''), <FONT color=#0000ff>CHAR</FONT>(146), ''), <FONT color=#0000ff>CHAR</FONT>(147), ''), <FONT color=#0000ff>CHAR</FONT></FONT><FONT face="Courier New">(148), ''))),</FONT></FONT></P>
    <P><FONT size=2><FONT face="Courier New">RdhType = </FONT><FONT face="Courier New"><FONT color=#0000ff>LTRIM</FONT>(<FONT color=#0000ff>RTRIM</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>ISNULL</FONT>(RdhType, ''), <FONT color=#0000ff>CHAR</FONT>(10), ''), <FONT color=#0000ff>CHAR</FONT>(13), ''), <FONT color=#0000ff>CHAR</FONT>(34), ''), <FONT color=#0000ff>CHAR</FONT>(145), ''), <FONT color=#0000ff>CHAR</FONT>(146), ''), <FONT color=#0000ff>CHAR</FONT>(147), ''), <FONT color=#0000ff>CHAR</FONT></FONT><FONT face="Courier New">(148), ''))),</FONT></FONT></P>
    <P><FONT size=2><FONT face="Courier New">RdhID = </FONT><FONT face="Courier New"><FONT color=#0000ff>LTRIM</FONT>(<FONT color=#0000ff>RTRIM</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>ISNULL</FONT>(RdhID, ''), <FONT color=#0000ff>CHAR</FONT>(10), ''), <FONT color=#0000ff>CHAR</FONT>(13), ''), <FONT color=#0000ff>CHAR</FONT>(34), ''), <FONT color=#0000ff>CHAR</FONT>(145), ''), <FONT color=#0000ff>CHAR</FONT>(146), ''), <FONT color=#0000ff>CHAR</FONT>(147), ''), <FONT color=#0000ff>CHAR</FONT></FONT><FONT face="Courier New">(148), ''))),</FONT></FONT></P>
    <P><FONT size=2><FONT face="Courier New">WWCustomerNumber = </FONT><FONT face="Courier New"><FONT color=#0000ff>LTRIM</FONT>(<FONT color=#0000ff>RTRIM</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>ISNULL</FONT>(WWCustomerNumber, ''), <FONT color=#0000ff>CHAR</FONT>(10), ''), <FONT color=#0000ff>CHAR</FONT>(13), ''), <FONT color=#0000ff>CHAR</FONT>(34), ''), <FONT color=#0000ff>CHAR</FONT>(145), ''), <FONT color=#0000ff>CHAR</FONT>(146), ''), <FONT color=#0000ff>CHAR</FONT>(147), ''), <FONT color=#0000ff>CHAR</FONT></FONT><FONT face="Courier New">(148), ''))),</FONT></FONT></P>
    <P><FONT size=2><FONT face="Courier New">DunsNumber = </FONT><FONT face="Courier New"><FONT color=#0000ff>LTRIM</FONT>(<FONT color=#0000ff>RTRIM</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>ISNULL</FONT>(DunsNumber, ''), <FONT color=#0000ff>CHAR</FONT>(10), ''), <FONT color=#0000ff>CHAR</FONT>(13), ''), <FONT color=#0000ff>CHAR</FONT>(34), ''), <FONT color=#0000ff>CHAR</FONT>(145), ''), <FONT color=#0000ff>CHAR</FONT>(146), ''), <FONT color=#0000ff>CHAR</FONT>(147), ''), <FONT color=#0000ff>CHAR</FONT></FONT><FONT face="Courier New">(148), ''))),</FONT></FONT></P>
    <P><FONT size=2><FONT face="Courier New">EstablishmentSize = </FONT><FONT face="Courier New"><FONT color=#0000ff>LTRIM</FONT>(<FONT color=#0000ff>RTRIM</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>ISNULL</FONT>(EstablishmentSize, ''), <FONT color=#0000ff>CHAR</FONT>(10), ''), <FONT color=#0000ff>CHAR</FONT>(13), ''), <FONT color=#0000ff>CHAR</FONT>(34), ''), <FONT color=#0000ff>CHAR</FONT>(145), ''), <FONT color=#0000ff>CHAR</FONT>(146), ''), <FONT color=#0000ff>CHAR</FONT>(147), ''), <FONT color=#0000ff>CHAR</FONT></FONT><FONT face="Courier New">(148), ''))),</FONT></FONT></P>
    <P><FONT size=2><FONT face="Courier New">ContactTitle = </FONT><FONT face="Courier New"><FONT color=#0000ff>LTRIM</FONT>(<FONT color=#0000ff>RTRIM</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>ISNULL</FONT>(ContactTitle, ''), <FONT color=#0000ff>CHAR</FONT>(10), ''), <FONT color=#0000ff>CHAR</FONT>(13), ''), <FONT color=#0000ff>CHAR</FONT>(34), ''), <FONT color=#0000ff>CHAR</FONT>(145), ''), <FONT color=#0000ff>CHAR</FONT>(146), ''), <FONT color=#0000ff>CHAR</FONT>(147), ''), <FONT color=#0000ff>CHAR</FONT></FONT><FONT face="Courier New">(148), ''))),</FONT></FONT></P>
    <P><FONT size=2><FONT face="Courier New">FirstName = </FONT><FONT face="Courier New"><FONT color=#0000ff>LTRIM</FONT>(<FONT color=#0000ff>RTRIM</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>ISNULL</FONT>(FirstName, ''), <FONT color=#0000ff>CHAR</FONT>(10), ''), <FONT color=#0000ff>CHAR</FONT>(13), ''), <FONT color=#0000ff>CHAR</FONT>(34), ''), <FONT color=#0000ff>CHAR</FONT>(145), ''), <FONT color=#0000ff>CHAR</FONT>(146), ''), <FONT color=#0000ff>CHAR</FONT>(147), ''), <FONT color=#0000ff>CHAR</FONT></FONT><FONT face="Courier New">(148), ''))),</FONT></FONT></P>
    <P><FONT size=2><FONT face="Courier New">FullName = </FONT><FONT face="Courier New"><FONT color=#0000ff>LTRIM</FONT>(<FONT color=#0000ff>RTRIM</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>ISNULL</FONT>(FullName, ''), <FONT color=#0000ff>CHAR</FONT>(10), ''), <FONT color=#0000ff>CHAR</FONT>(13), ''), <FONT color=#0000ff>CHAR</FONT>(34), ''), <FONT color=#0000ff>CHAR</FONT>(145), ''), <FONT color=#0000ff>CHAR</FONT>(146), ''), <FONT color=#0000ff>CHAR</FONT>(147), ''), <FONT color=#0000ff>CHAR</FONT></FONT><FONT face="Courier New">(148), ''))),</FONT></FONT></P>
    <P><FONT size=2><FONT face="Courier New">ContactJob = </FONT><FONT face="Courier New"><FONT color=#0000ff>LTRIM</FONT>(<FONT color=#0000ff>RTRIM</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>ISNULL</FONT>(ContactJob, ''), <FONT color=#0000ff>CHAR</FONT>(10), ''), <FONT color=#0000ff>CHAR</FONT>(13), ''), <FONT color=#0000ff>CHAR</FONT>(34), ''), <FONT color=#0000ff>CHAR</FONT>(145), ''), <FONT color=#0000ff>CHAR</FONT>(146), ''), <FONT color=#0000ff>CHAR</FONT>(147), ''), <FONT color=#0000ff>CHAR</FONT></FONT><FONT face="Courier New">(148), ''))),</FONT></FONT></P>
    <P><FONT size=2><FONT face="Courier New">ContactPhoneNumber = </FONT><FONT face="Courier New"><FONT color=#0000ff>LTRIM</FONT>(<FONT color=#0000ff>RTRIM</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>ISNULL</FONT>(ContactPhoneNumber, ''), <FONT color=#0000ff>CHAR</FONT>(10), ''), <FONT color=#0000ff>CHAR</FONT>(13), ''), <FONT color=#0000ff>CHAR</FONT>(34), ''), <FONT color=#0000ff>CHAR</FONT>(145), ''), <FONT color=#0000ff>CHAR</FONT>(146), ''), <FONT color=#0000ff>CHAR</FONT>(147), ''), <FONT color=#0000ff>CHAR</FONT></FONT><FONT face="Courier New">(148), ''))),</FONT></FONT></P>
    <P><FONT size=2><FONT face="Courier New">IbmContactNumber = </FONT><FONT face="Courier New"><FONT color=#0000ff>LTRIM</FONT>(<FONT color=#0000ff>RTRIM</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>ISNULL</FONT>(IbmContactNumber, ''), <FONT color=#0000ff>CHAR</FONT>(10), ''), <FONT color=#0000ff>CHAR</FONT>(13), ''), <FONT color=#0000ff>CHAR</FONT>(34), ''), <FONT color=#0000ff>CHAR</FONT>(145), ''), <FONT color=#0000ff>CHAR</FONT>(146), ''), <FONT color=#0000ff>CHAR</FONT>(147), ''), <FONT color=#0000ff>CHAR</FONT></FONT><FONT face="Courier New">(148), ''))),</FONT></FONT></P>
    <P><FONT size=2><FONT face="Courier New">ProductVendor = </FONT><FONT face="Courier New"><FONT color=#0000ff>LTRIM</FONT>(<FONT color=#0000ff>RTRIM</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>ISNULL</FONT>(ProductVendor, ''), <FONT color=#0000ff>CHAR</FONT>(10), ''), <FONT color=#0000ff>CHAR</FONT>(13), ''), <FONT color=#0000ff>CHAR</FONT>(34), ''), <FONT color=#0000ff>CHAR</FONT>(145), ''), <FONT color=#0000ff>CHAR</FONT>(146), ''), <FONT color=#0000ff>CHAR</FONT>(147), ''), <FONT color=#0000ff>CHAR</FONT></FONT><FONT face="Courier New">(148), ''))),</FONT></FONT></P>
    <P><FONT size=2><FONT face="Courier New">ProductName = </FONT><FONT face="Courier New"><FONT color=#0000ff>LTRIM</FONT>(<FONT color=#0000ff>RTRIM</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>ISNULL</FONT>(ProductName, ''), <FONT color=#0000ff>CHAR</FONT>(10), ''), <FONT color=#0000ff>CHAR</FONT>(13), ''), <FONT color=#0000ff>CHAR</FONT>(34), ''), <FONT color=#0000ff>CHAR</FONT>(145), ''), <FONT color=#0000ff>CHAR</FONT>(146), ''), <FONT color=#0000ff>CHAR</FONT>(147), ''), <FONT color=#0000ff>CHAR</FONT></FONT><FONT face="Courier New">(148), ''))),</FONT></FONT></P>
    <P><FONT size=2><FONT face="Courier New">SoftwareVersion = </FONT><FONT face="Courier New"><FONT color=#0000ff>LTRIM</FONT>(<FONT color=#0000ff>RTRIM</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>ISNULL</FONT>(SoftwareVersion, ''), <FONT color=#0000ff>CHAR</FONT>(10), ''), <FONT color=#0000ff>CHAR</FONT>(13), ''), <FONT color=#0000ff>CHAR</FONT>(34), ''), <FONT color=#0000ff>CHAR</FONT>(145), ''), <FONT color=#0000ff>CHAR</FONT>(146), ''), <FONT color=#0000ff>CHAR</FONT>(147), ''), <FONT color=#0000ff>CHAR</FONT></FONT><FONT face="Courier New">(148), ''))),</FONT></FONT></P>
    <P><FONT size=2><FONT face="Courier New">SoftwareOS = </FONT><FONT face="Courier New"><FONT color=#0000ff>LTRIM</FONT>(<FONT color=#0000ff>RTRIM</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>ISNULL</FONT>(SoftwareOS, ''), <FONT color=#0000ff>CHAR</FONT>(10), ''), <FONT color=#0000ff>CHAR</FONT>(13), ''), <FONT color=#0000ff>CHAR</FONT>(34), ''), <FONT color=#0000ff>CHAR</FONT>(145), ''), <FONT color=#0000ff>CHAR</FONT>(146), ''), <FONT color=#0000ff>CHAR</FONT>(147), ''), <FONT color=#0000ff>CHAR</FONT></FONT><FONT face="Courier New">(148), ''))),</FONT></FONT></P>
    <P><FONT size=2><FONT face="Courier New">HardwareSeries = </FONT><FONT face="Courier New"><FONT color=#0000ff>LTRIM</FONT>(<FONT color=#0000ff>RTRIM</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>ISNULL</FONT>(HardwareSeries, ''), <FONT color=#0000ff>CHAR</FONT>(10), ''), <FONT color=#0000ff>CHAR</FONT>(13), ''), <FONT color=#0000ff>CHAR</FONT>(34), ''), <FONT color=#0000ff>CHAR</FONT>(145), ''), <FONT color=#0000ff>CHAR</FONT>(146), ''), <FONT color=#0000ff>CHAR</FONT>(147), ''), <FONT color=#0000ff>CHAR</FONT></FONT><FONT face="Courier New">(148), ''))),</FONT></FONT></P>
    <P><FONT size=2><FONT face="Courier New">HardwareProductGroup = </FONT><FONT face="Courier New"><FONT color=#0000ff>LTRIM</FONT>(<FONT color=#0000ff>RTRIM</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>ISNULL</FONT>(HardwareProductGroup, ''), <FONT color=#0000ff>CHAR</FONT>(10), ''), <FONT color=#0000ff>CHAR</FONT>(13), ''), <FONT color=#0000ff>CHAR</FONT>(34), ''), <FONT color=#0000ff>CHAR</FONT>(145), ''), <FONT color=#0000ff>CHAR</FONT>(146), ''), <FONT color=#0000ff>CHAR</FONT>(147), ''), <FONT color=#0000ff>CHAR</FONT></FONT><FONT face="Courier New">(148), ''))),</FONT></FONT></P>
    <P><FONT size=2><FONT face="Courier New">SoftwareProductID = </FONT><FONT face="Courier New"><FONT color=#0000ff>LTRIM</FONT>(<FONT color=#0000ff>RTRIM</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>ISNULL</FONT>(SoftwareProductID, ''), <FONT color=#0000ff>CHAR</FONT>(10), ''), <FONT color=#0000ff>CHAR</FONT>(13), ''), <FONT color=#0000ff>CHAR</FONT>(34), ''), <FONT color=#0000ff>CHAR</FONT>(145), ''), <FONT color=#0000ff>CHAR</FONT>(146), ''), <FONT color=#0000ff>CHAR</FONT>(147), ''), <FONT color=#0000ff>CHAR</FONT></FONT><FONT face="Courier New">(148), ''))),</FONT></FONT></P>
    <P><FONT size=2><FONT face="Courier New">SoftwareComponentID = </FONT><FONT face="Courier New"><FONT color=#0000ff>LTRIM</FONT>(<FONT color=#0000ff>RTRIM</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>ISNULL</FONT>(SoftwareComponentID, ''), <FONT color=#0000ff>CHAR</FONT>(10), ''), <FONT color=#0000ff>CHAR</FONT>(13), ''), <FONT color=#0000ff>CHAR</FONT>(34), ''), <FONT color=#0000ff>CHAR</FONT>(145), ''), <FONT color=#0000ff>CHAR</FONT>(146), ''), <FONT color=#0000ff>CHAR</FONT>(147), ''), <FONT color=#0000ff>CHAR</FONT></FONT><FONT face="Courier New">(148), ''))),</FONT></FONT></P>
    <P><FONT size=2><FONT face="Courier New">SoftwarePartNumber = </FONT><FONT face="Courier New"><FONT color=#0000ff>LTRIM</FONT>(<FONT color=#0000ff>RTRIM</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>ISNULL</FONT>(SoftwarePartNumber, ''), <FONT color=#0000ff>CHAR</FONT>(10), ''), <FONT color=#0000ff>CHAR</FONT>(13), ''), <FONT color=#0000ff>CHAR</FONT>(34), ''), <FONT color=#0000ff>CHAR</FONT>(145), ''), <FONT color=#0000ff>CHAR</FONT>(146), ''), <FONT color=#0000ff>CHAR</FONT>(147), ''), <FONT color=#0000ff>CHAR</FONT></FONT><FONT face="Courier New">(148), ''))),</FONT></FONT></P>
    <P><FONT size=2><FONT face="Courier New">HardwareModel = </FONT><FONT face="Courier New"><FONT color=#0000ff>LTRIM</FONT>(<FONT color=#0000ff>RTRIM</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>ISNULL</FONT>(HardwareModel, ''), <FONT color=#0000ff>CHAR</FONT>(10), ''), <FONT color=#0000ff>CHAR</FONT>(13), ''), <FONT color=#0000ff>CHAR</FONT>(34), ''), <FONT color=#0000ff>CHAR</FONT>(145), ''), <FONT color=#0000ff>CHAR</FONT>(146), ''), <FONT color=#0000ff>CHAR</FONT>(147), ''), <FONT color=#0000ff>CHAR</FONT></FONT><FONT face="Courier New">(148), ''))),</FONT></FONT></P>
    <P><FONT size=2><FONT face="Courier New">HardwareMachineType = </FONT><FONT face="Courier New"><FONT color=#0000ff>LTRIM</FONT>(<FONT color=#0000ff>RTRIM</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>ISNULL</FONT>(HardwareMachineType, ''), <FONT color=#0000ff>CHAR</FONT>(10), ''), <FONT color=#0000ff>CHAR</FONT>(13), ''), <FONT color=#0000ff>CHAR</FONT>(34), ''), <FONT color=#0000ff>CHAR</FONT>(145), ''), <FONT color=#0000ff>CHAR</FONT>(146), ''), <FONT color=#0000ff>CHAR</FONT>(147), ''), <FONT color=#0000ff>CHAR</FONT></FONT><FONT face="Courier New">(148), ''))),</FONT></FONT></P>
    <P><FONT size=2><FONT face="Courier New">ContactEmail = </FONT><FONT face="Courier New"><FONT color=#0000ff>LTRIM</FONT>(<FONT color=#0000ff>RTRIM</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>ISNULL</FONT>(ContactEmail, ''), <FONT color=#0000ff>CHAR</FONT>(10), ''), <FONT color=#0000ff>CHAR</FONT>(13), ''), <FONT color=#0000ff>CHAR</FONT>(34), ''), <FONT color=#0000ff>CHAR</FONT>(145), ''), <FONT color=#0000ff>CHAR</FONT>(146), ''), <FONT color=#0000ff>CHAR</FONT>(147), ''), <FONT color=#0000ff>CHAR</FONT></FONT><FONT face="Courier New">(148), ''))),</FONT></FONT></P>
    <P><FONT size=2><FONT face="Courier New">CompanyNameLong = </FONT><FONT face="Courier New"><FONT color=#0000ff>LTRIM</FONT>(<FONT color=#0000ff>RTRIM</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>ISNULL</FONT>(CompanyNameLong, ''), <FONT color=#0000ff>CHAR</FONT>(10), ''), <FONT color=#0000ff>CHAR</FONT>(13), ''), <FONT color=#0000ff>CHAR</FONT>(34), ''), <FONT color=#0000ff>CHAR</FONT>(145), ''), <FONT color=#0000ff>CHAR</FONT>(146), ''), <FONT color=#0000ff>CHAR</FONT>(147), ''), <FONT color=#0000ff>CHAR</FONT></FONT><FONT face="Courier New">(148), ''))),</FONT></FONT></P>
    <P><FONT size=2><FONT face="Courier New">InterviewLanguage = </FONT><FONT face="Courier New"><FONT color=#0000ff>LTRIM</FONT>(<FONT color=#0000ff>RTRIM</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>ISNULL</FONT>(InterviewLanguage, ''), <FONT color=#0000ff>CHAR</FONT>(10), ''), <FONT color=#0000ff>CHAR</FONT>(13), ''), <FONT color=#0000ff>CHAR</FONT>(34), ''), <FONT color=#0000ff>CHAR</FONT>(145), ''), <FONT color=#0000ff>CHAR</FONT>(146), ''), <FONT color=#0000ff>CHAR</FONT>(147), ''), <FONT color=#0000ff>CHAR</FONT></FONT><FONT face="Courier New">(148), ''))),</FONT></FONT></P>
    <P><FONT size=2><FONT face="Courier New">Salutation = </FONT><FONT face="Courier New"><FONT color=#0000ff>LTRIM</FONT>(<FONT color=#0000ff>RTRIM</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>ISNULL</FONT>(Salutation, ''), <FONT color=#0000ff>CHAR</FONT>(10), ''), <FONT color=#0000ff>CHAR</FONT>(13), ''), <FONT color=#0000ff>CHAR</FONT>(34), ''), <FONT color=#0000ff>CHAR</FONT>(145), ''), <FONT color=#0000ff>CHAR</FONT>(146), ''), <FONT color=#0000ff>CHAR</FONT>(147), ''), <FONT color=#0000ff>CHAR</FONT></FONT><FONT face="Courier New">(148), ''))),</FONT></FONT></P>
    <P><FONT size=2><FONT face="Courier New">CompanyNameAbbreviation = </FONT><FONT face="Courier New"><FONT color=#0000ff>LTRIM</FONT>(<FONT color=#0000ff>RTRIM</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>ISNULL</FONT>(CompanyNameAbbreviation, ''), <FONT color=#0000ff>CHAR</FONT>(10), ''), <FONT color=#0000ff>CHAR</FONT>(13), ''), <FONT color=#0000ff>CHAR</FONT>(34), ''), <FONT color=#0000ff>CHAR</FONT>(145), ''), <FONT color=#0000ff>CHAR</FONT>(146), ''), <FONT color=#0000ff>CHAR</FONT>(147), ''), <FONT color=#0000ff>CHAR</FONT></FONT><FONT face="Courier New">(148), ''))),</FONT></FONT></P>
    <P><FONT size=2><FONT face="Courier New">UniversalCountryCode = </FONT><FONT face="Courier New"><FONT color=#0000ff>LTRIM</FONT>(<FONT color=#0000ff>RTRIM</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>ISNULL</FONT>(EmailFlag, ''), <FONT color=#0000ff>CHAR</FONT>(10), ''), <FONT color=#0000ff>CHAR</FONT>(13), ''), <FONT color=#0000ff>CHAR</FONT>(34), ''), <FONT color=#0000ff>CHAR</FONT>(145), ''), <FONT color=#0000ff>CHAR</FONT>(146), ''), <FONT color=#0000ff>CHAR</FONT>(147), ''), <FONT color=#0000ff>CHAR</FONT></FONT><FONT face="Courier New">(148), ''))),</FONT></FONT></P>
    <P><FONT size=2><FONT face="Courier New">EmailFlag = </FONT><FONT face="Courier New"><FONT color=#0000ff>LTRIM</FONT>(<FONT color=#0000ff>RTRIM</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>ISNULL</FONT>(EmailFlag, ''), <FONT color=#0000ff>CHAR</FONT>(10), ''), <FONT color=#0000ff>CHAR</FONT>(13), ''), <FONT color=#0000ff>CHAR</FONT>(34), ''), <FONT color=#0000ff>CHAR</FONT>(145), ''), <FONT color=#0000ff>CHAR</FONT>(146), ''), <FONT color=#0000ff>CHAR</FONT>(147), ''), <FONT color=#0000ff>CHAR</FONT></FONT><FONT face="Courier New">(148), ''))),</FONT></FONT></P>
    <P><FONT size=2><FONT face="Courier New">SurveyFlag = </FONT><FONT face="Courier New"><FONT color=#0000ff>LTRIM</FONT>(<FONT color=#0000ff>RTRIM</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>REPLACE</FONT>(<FONT color=#0000ff>ISNULL</FONT>(SurveyFlag, ''), <FONT color=#0000ff>CHAR</FONT>(10), ''), <FONT color=#0000ff>CHAR</FONT>(13), ''), <FONT color=#0000ff>CHAR</FONT>(34), ''), <FONT color=#0000ff>CHAR</FONT>(145), ''), <FONT color=#0000ff>CHAR</FONT>(146), ''), <FONT color=#0000ff>CHAR</FONT>(147), ''), <FONT color=#0000ff>CHAR</FONT></FONT><FONT face="Courier New">(148), '')))</FONT></FONT></P>
    <P><FONT face="Courier New"><FONT size=2><FONT color=#0000ff>WHERE </FONT>SampleSourceKey = @sampleSourceKey</FONT></FONT></P>
    <P><FONT face="Courier New" size=2></FONT>&nbsp;</P>
    <P><FONT face="Courier New" size=2>-- Oh, and then there was this other one that does SERIOUS heavy lifting that is over 7 pages long.&nbsp; Then a coworker discovered that it has to operate in two different modes to support an optional parameter, so now it looks like this:</FONT></P>
    <P><FONT face="Courier New" size=2>IF @clmrKey IS NULL</FONT></P>
    <P><FONT face="Courier New" size=2>BEGIN</FONT></P>
    <P><FONT face="Courier New" size=2>&nbsp;&nbsp;&nbsp;-- 7 pages of code</FONT></P>
    <P><FONT face="Courier New" size=2>END</FONT></P>
    <P><FONT face="Courier New" size=2>ELSE</FONT></P>
    <P><FONT face="Courier New" size=2>BEGIN</FONT></P>
    <P><FONT face="Courier New" size=2>&nbsp;&nbsp;&nbsp;-- 7 pages of the same identical code with one phrase of the WHERE clauses changed</FONT></P>
    <P><FONT size=1><FONT face="Courier New" size=2>END</FONT></P></FONT>
  • Mark L. 2005-08-16 12:52
    Poo on regexp... use codegen for these situations!<br>
  • Quinnum 2005-08-17 01:27
    Anonymous:

    <P>*They made me&nbsp;add this update* to a stored procedure (after much protest and many meetings):</P><FONT size=1>
    <P></FONT><FONT color=#008000><FONT face="Courier New" size=2>-- Save yourself the trouble and don't even ask. SHEESH!</FONT></P>
    <P></FONT>
    </P>
    <P>OMFG!</P>
    <P>But a big WTF is why where there are bloody carriage returns and line feeds in the data in the first place ????</P>
    <P>Data validation on input == good.</P>
    <P>&nbsp;</P>
  • DWalker59 2005-08-17 14:22
    <DIV>"Strings in VB6 can be changed, they are not immutable."</DIV>
    <DIV>&nbsp;</DIV>
    <DIV>Strings in VB6 are immutable at the lowest level, and they can be changed.&nbsp; When you change a string, the original underlying string is destroyed and a new string is created.</DIV>
    <DIV>&nbsp;</DIV>
    <DIV>You&nbsp;need to know this if you care about performance in an application that does a lot of string manipulation.</DIV>
    <DIV>&nbsp;</DIV>
    <DIV>Try Google for VB string immutable.&nbsp; One reference is <A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcn7/html/vaconstringsinvisualbasic.asp">http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcn7/html/vaconstringsinvisualbasic.asp</A>&nbsp;(which is for VB.NET but I'm pretty sure it applies to all earlier VBs such as VB6).</DIV>
    <DIV>&nbsp;</DIV>
    <DIV>David Walker<BR></DIV>
  • foxyshadis 2005-08-17 18:57
    PstScrpt:
    <p>
    dubwai:
    </p>
    <p>Why would one do any of these?&nbsp;&nbsp;Is there no mutable String
    type in VB or something? Can you not create Strings from arrays of
    characters?
    </p>
    <p>No, there's no mutable string type (at least in QuickBasic through VB6).&nbsp; </p>
    <p>To create a string from an array of characters, the language would
    have to have a character type, which it doesn't.&nbsp; When you need to
    store a character, you use a string that just happens to be really
    short.</p>
    <br>
    That's very funny, because I've been using VB <span style="font-weight: bold;">byte</span>
    arrays for years! (The rare times I use VB.) They aren't unicode,
    unless you use custom unicode access functions, and you have to use
    idioms that are more similar to C than VB to work with them, but their
    performance in heavy loops is massively better than the immutable
    String type.<br>