With Statement

This is a discussion on "With Statement" within the Classic ASP section. This forum, and the thread "With Statement are both part of the Program Your Website category.



 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > Classic ASP

Notices


Closed Thread
 
LinkBack Thread Tools
  #1  
Old Feb 2nd, 2004, 13:02
Up'n'Coming Member
Join Date: Feb 2004
Location: Woodbridge, UK
Age: 27
Posts: 80
Thanks: 0
Thanked 0 Times in 0 Posts
With Statement

I'm sure I read somewhere in the past that using VBScript's with statement is slower than not using it. For example
Code: Select all
With Response
    .Write "Hello World"
    .Write "Your Name Is " & strName
End With
Should be slower than
Code: Select all
Response.Write ("Hello World")
Response.Write ("Your Name Is " & strName)
Is this true, is it an ASP 2.0 thing, or am I talking bollocks?! I'm sure I saw it on the 4guys website once, but I cant find it now :sad:

Rob.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!

  #2  
Old Feb 2nd, 2004, 13:08
Up'n'Coming Member
Join Date: Feb 2004
Location: Woodbridge, UK
Age: 27
Posts: 80
Thanks: 0
Thanked 0 Times in 0 Posts
Scratch that, I just found it: http://www.4guysfromrolla.com/webtech/010202-1.shtml

With is about 10x slower than individual response.writes, lol.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #3  
Old Feb 2nd, 2004, 14:56
Rob's Avatar
Rob Rob is online now
Webforumz Founder
Join Date: Jul 2003
Location: Southern UK
Age: 34
Posts: 3,155
Blog Entries: 7
Thanks: 26
Thanked 19 Times in 16 Posts
yeah... I never use it myself for this reason. I guess it's because a copy of the object needs to made for 'with' to use....
__________________
Click the 'Thanks!' button if this post has helped you

Rob - Webforumz Founder
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Closed Thread

Tags
statement

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP If Statement... mcdanielnc89 PHP Forum 16 Dec 9th, 2007 17:44
If..Else statement help IanW PHP Forum 3 Oct 6th, 2006 13:40
SELECT statement gecastill Databases 1 Feb 15th, 2006 23:27
Help with If Statement. JohnMitch Classic ASP 2 Jan 5th, 2005 01:05


All times are GMT. The time now is 15:16.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42