|
-
Nov 26th, 2000, 11:14 AM
#1
Thread Starter
Member
Hello,
I am writing a program in VB6 in which I need to open a text file and search for and words contained in brackets like this: <word>. As each word is found, I need to put the word into a string variable array for later use. Any code or suggestions would be greatly appreciated.
-
Nov 26th, 2000, 12:30 PM
#2
Hyperactive Member
i can't give u much help but search for str function in the help section of vb ... i think it allows u to search for a character in a string ... if not then then look for the split function
-
Nov 26th, 2000, 01:20 PM
#3
transcendental analytic
Code:
dim buffer as string,arr() as string,x as long
open file for binary as 1
buffer=space(lof(1))
get#1,,buffer
close1
buffer=left(buffer,instr(buffer,"<")+1)
arr=split(buffer,"<")
for x=0 to ubound(arr)
arr(x)=left(arr(x),instr(buffer,">")-1)
next x
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|