Wrox Programmer Forums
| 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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
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
 
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.
 
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




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





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.