Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > long text in variable

Reply
Thread Tools

long text in variable

 
 
joe
Guest
Posts: n/a
 
      04-20-2005
I am using some code like the one below to work with a text file, modifying
its lines one by one:

Set objFS = Server.CreateObject("Scripting.FileSystemObject")

Set objF = objFS.OpenTextFile("MyText.txt", 1)

Do While objF.Line <= 26 ' --- I am reading only certain lines

'--- get entire line
strTemp = objF.ReadLine
'--- do some other stuff here

Loop

Now, I'd like to do the same with similar data that's been stored in a
variable instead of a file.
I guess I could split the variable into an array by using line break as the
splitting character, and
loop the array elements. Any other suggestion? Thanks in advance.






 
Reply With Quote
 
 
 
 
Ray Costanzo [MVP]
Guest
Posts: n/a
 
      04-20-2005
Hi joe,

Your splitting on vbCrLf sounds like a good solution to me.

Ray at work

"joe" <(E-Mail Removed)> wrote in message
news:d0u9e.10853$(E-Mail Removed). ..
> I am using some code like the one below to work with a text file,

modifying
> its lines one by one:
>
> Set objFS = Server.CreateObject("Scripting.FileSystemObject")
>
> Set objF = objFS.OpenTextFile("MyText.txt", 1)
>
> Do While objF.Line <= 26 ' --- I am reading only certain lines
>
> '--- get entire line
> strTemp = objF.ReadLine
> '--- do some other stuff here
>
> Loop
>
> Now, I'd like to do the same with similar data that's been stored in a
> variable instead of a file.
> I guess I could split the variable into an array by using line break as

the
> splitting character, and
> loop the array elements. Any other suggestion? Thanks in advance.
>
>
>
>
>
>



 
Reply With Quote
 
 
 
Reply

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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Having compilation error: no match for call to (const __gnu_cxx::hash<long long int>) (const long long int&) veryhotsausage C++ 1 07-04-2008 05:41 PM
Use of Long and Long Long Bart C C Programming 27 01-15-2008 05:27 AM
long long and long Mathieu Dutour C Programming 4 07-24-2007 11:15 AM
unsigned long long int to long double Daniel Rudy C Programming 5 09-20-2005 02:37 AM
Assigning unsigned long to unsigned long long George Marsaglia C Programming 1 07-08-2003 05:16 PM



Advertisments