|
Subject:
|
chapter 10 p404
|
|
Posted By:
|
veerle
|
Post Date:
|
9/22/2003 1:33:26 PM
|
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:
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), " ")
Response.Write strLine
Response.Write "<BR>" + vbCrLf
Loop
objFileTextStream.Close
Veerle
|
|
Reply By:
|
pgtips
|
Reply Date:
|
9/23/2003 3:42:56 AM
|
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.
|
|
Reply By:
|
veerle
|
Reply Date:
|
9/23/2003 4:41:29 AM
|
Thank you very much for this explanation. As simple as it is, I had no idee!
kind regards,
Veerle
|