ASP - line continuation character sequence - Asked By Joe Barker on 22-Aug-01 05:48 AM
when passing a long string to the response.write method, i am splitting the code onto mulitple lines for readability using the vbscript continuation sequence - '& _'. Is the treated as string concatenation at run-time (and hence increase overhead) or is it resolved at compile time?
Hmmm... - Asked By Robbe Morris on 22-Aug-01 07:17 AM
Because of the concatenation, I would think individual lines of .write would be faster because you are just writing the contents to the buffer. I never taken the time to test it, but I would think it uses less resources.
hmm - Asked By Heaven's Martini on 20-Jul-14 01:01 AM
Although I don't know the inners of how the compilers work,etc.
With Vbscript string concatenation, there is a law of diminishing returns when it comes to calling response.write or building a string like you are.
I personally, do not concatenate to much together before calling response.write. I have read some performance tests that show response.write out performing string concatenation (especially in large strings).
(i think there was a good test done at www.15seconds.com)
& vs "_" - Asked By Peter Bromberg on 22-Aug-01 09:56 AM
The Ampersand "&" is the VBScript String-continuation character. The Line Continuation character "_" has nothing to do with string concatenation. Its the same as if you had typed everything in one long string.
BTW, VBScript is not compiled, it's interpreted. Switch to VB.NET if you want to see what happens when it really does finally get compiled (hehe)!
The reason - Asked By Desert Ghost on 22-Aug-01 11:57 AM
Peter is dead on with his answer.
The reason VBScript needs a _ to continue a line is because VBScript treats a carriage return as an end of statement... the _ simply tells it to ignore the carriage return on that particular line.
Though not suggested...
good to know - Asked By Heaven's Martini on 22-Aug-01 01:11 PM
i was thinking that
,when i was on the box about concatenation.
good to know i should believe in my knowledge somewhat.
You must've been happy - Asked By Desert Ghost on 22-Aug-01 01:31 PM
the other night when your boys put an ass whooping on Denver (I know, preseason, but hey)
Favre looked okay... his receivers sure didn't though.
So glad football is about to begin... though the Diamondbacks are heading for the pennant race, so I'm starting to take an interest in baseball.
ha - Asked By Heaven's Martini on 22-Aug-01 01:54 PM
I sorta watched it.
The receivers drop lots of passes and then have flashes of brilliance. Lots of players are hurt i guess.
Love football season, Sunday afternoons at home or at the bar drinkin with friends. Saturday badger games in between hunts.
Shooting things, football and drinking. gotta love it.
Shooting things, football and drinking - Asked By Desert Ghost on 20-Jul-14 01:02 AM
If you were a Cardinals fan, you'd try and do that all at the same time... WTF were they thinking of trying a 30 yard field goal to put the game into overtime on Saturday????
McGinnis wants to test his kicker
Ummmm... 30 yards??? From 50, okay. They just wanted to win. And boy did they look like crap. Jake throws incomplete passes up the yang, but the highlight is a TD pass. One attaboy, I guess.
3rd string O line looks better than the starters.
We need a football forum! Egg?
Hey, you interested in participating in a fantasy league? My buddy just emailed me... wanna join in? You don't get many programmers who are into football, that's for sure. It's our blue collar roots.
fantasies - Asked By Heaven's Martini on 23-Aug-01 07:18 AM
well there is Teri Hatcher and I walking on the beach..........
fantasy league? Hmm.
The announcers are idiots. that is for sure.
Packers looked okay, but I the receivers are kinda "iffy".
Go Billy Schroeder! (From WI).
Blue collar? I still am. I carried a briefcase for awhile when I got out of college, but now if i carry anything, its beer to drink on the way home.
Shitty week here:My coworker resigned and I have a new guy starting in two weeks, and i have to carry the load. <ugh/>