forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


PARSE

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
michaelmcstay
Newbie


Joined: 16 Oct 2005
Posts: 6
Location: UT

PostPosted: Mon Oct 17, 2005 4:27 am    Post subject: PARSE Reply with quote

i'm trying to read line by line from a txt file like line one line to and so
and i was Wondering if the PARSE command was how to do that
Michael
Back to top
View user's profile Send private message Visit poster's website
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Mon Oct 17, 2005 4:52 am    Post subject: Reply with quote

The PARSE command is for parsing a string containing multiple bits of
information into separate variables or to controls. To read the contents of
a list control or a string list line by line, try the following code::

Code:

  REM Replace "test.txt" with the appropriate file name
  %%file = test.txt

  list create,1
  list loadfile,1,%%file
  %x = 0
  if @greater(@count(1),0)
    repeat
      %I = @item(1,%x)
      if @not(@null(%I))
        REM If we have some text, display it!
        INFO %I
      end
      %x = @succ(%x)
    until @greater(%x,@count(1))
  end
  list close,1

_________________
Bill Weckel
ShinobiSoft Software

"The way is known to all, but not all know it."
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group