Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP 3.0 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 22nd, 2003, 01:33 PM
Registered User
 
Join Date: Sep 2003
Location: Gent, , Belgium.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default chapter 10 p404

Hello,

In the code of the file "DisplaySource.asp" on line 30 I find the word "vbCrLf". I don't know what it is doing there. When I remove it, the file still seems to work fine, so I thought it was maybe an empty variable. I added "option explicit" and still I didn't get an error, so there goos my variable theory (I can't find any declaration of such a variable in the file).

Is there somebody who knows what this "vbCrLf" is doing there?

Here is the peace of code with the mysterious word in it:
Code:
  Dim objFileTextStream
  Set objFileTextStream = objFile.OpenAsTextStream(ForReading, TristateUseDefault)

  Dim strLine
  Do While objFileTextStream.AtEndOfStream <> True
    strLine = Server.HTMLEncode(objFileTextStream.ReadLine)
    strLine = Replace (strLine, Chr(9), "&nbsp;&nbsp;&nbsp;&nbsp;")
    Response.Write strLine
    Response.Write "<BR>" + vbCrLf
  Loop
  objFileTextStream.Close




Veerle
  #2 (permalink)  
Old September 23rd, 2003, 03:42 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , United Kingdom.
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

vbCrLf is just a constant that represents the carriage-return/line-feed character pair which marks the end of a line in a text file. Its built in to VBScript so that's why you don't see it declared anywhere, its part of the language.
  #3 (permalink)  
Old September 23rd, 2003, 04:41 AM
Registered User
 
Join Date: Sep 2003
Location: Gent, , Belgium.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you very much for this explanation. As simple as it is, I had no idee!

kind regards,

Veerle
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 10 gogeo BOOK: Beginning Access 2003 VBA 1 January 22nd, 2006 09:41 AM
Chapter 10 czambran BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 2 March 29th, 2005 09:35 AM
Chapter 10 columbiasmiles JSP Basics 0 May 17th, 2004 08:09 PM
p404 URLEncode returning nothing Timmo ASP.NET 1.0 and 1.1 Basics 0 February 3rd, 2004 03:38 PM



All times are GMT -4. The time now is 03:04 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.