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 


Retrieving the current fieldseperator

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Knowledge Base
View previous topic :: View next topic  
Author Message
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Fri Apr 04, 2003 3:03 pm    Post subject: Retrieving the current fieldseperator Reply with quote

Hi all,

I've thought about a way to retrieve the current fieldseperator, which can be handy when parsing, for example, HTML files. Just go to the GetFieldsep subroutine, and the %%Fieldsep variable will hold the current fieldseperator.

Know bug(s):
If you use a fieldseperator of the ASCII value 33 or lower, it won't recognize it, because when you parse it, it will be deleted...

Code:
Option Fieldsep,|

Gosub GetFieldsep
Info The current fieldseperator is %%Fieldsep.
Exit

:GetFieldsep
%%Fieldsep = 1
repeat
%%Justatempetorialvariable = %%Justatempetorialvariable@chr(%%Fieldsep)
%%Fieldsep = @succ(%%Fieldsep)
until @equal(%%Fieldsep,256)
parse "%%Justatempetorialvariable",%%Justatempetorialvariable
%%Fieldsep = @chr(@fadd(@len(%%Justatempetorialvariable),33))
exit
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Knowledge Base 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