Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Read a variable (not an object) line by line 1

Status
Not open for further replies.

JPJeffery

Technical User
May 26, 2006
600
GB
Hi

Long time no ask stupid questions.

I have a variable which is many lines long.

I know I can read an object representing a (text) file line-by-line with
Code:
While not objTextFile.AtEndOfStream
but if I have a multi-line variable which isn't represented or created by an object how can I achieve the same effect?

Hope you're all well...

JJ
[small][purple]Variables won't. Constants aren't[/purple]
There is no apostrophe in the plural of PC (or PST, or CPU, or HDD, or FDD, and so on)[/small]
 
[tt]dim s,a
[green]'the given
s="line 1" & vbcrlf & "line 2" & vbcrlf & "line 3"[/green]

a=split(s,vbcrlf)
for i=0 to ubound(a)
wscript.echo a(i)
next[/tt]
 
Of course...what can I say? It's hot here.

JJ
[small][purple]Variables won't. Constants aren't[/purple]
There is no apostrophe in the plural of PC (or PST, or CPU, or HDD, or FDD, and so on)[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top