You can define byte arrays in VB like so:
dim Path0(49) as byte
But keep in mind, that's as literal bytes. If the actual path is a string (sequence of characters) you probably wouldn't want to define it as a byte. I'm guessing the TP code IF Path[z] IN Path2 THEN is checking if Path2 contains the same data as a substring as Path[z] has. (so, if Path[z] = "hello", and path2 = "hello world", that it would return true). In VB, this is done with instr function. This thread should PROBABLY be moved to the VB forum, however.... let me know if this is what you had in mind.
Comatose
Taboo Programmer
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215
Actually, unless specifically noted otherwise (by the use of option base, or something nuts) then 0 is the default element of an array, so, X(0) would = 1, and X(254) = 255. Declaring it is not the same at all. It looks to me though, that the TP Code (which I know nothing about) is creating a user-defined type (looks like 2 types, but I don't know TP, type 1 being called elements, and type 2 being called Xpath.) Then it looks like variables Path0,Path1,Path2 are defined as type element, and Path is defined as type Xpath. I'm not 100% sure what the program you are trying to re-write does, so it makes it a lot harder for me to try to explain everything.... if you post a new thread in the VB forum, detailing the program you are trying to write, I can probably help more. It's best to have it as detailed as possible, with steps.... it would also help if you explain EXACTLY what the TP program does.....
Comatose
Taboo Programmer
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215