I have a problem!!
I am trying to convert pascal code to VB and am stuck.
TYPE Elements = SET of 1..255; Xpath = ARRAY[0..50] of BYTE; VAR Path0,Path1,Path2:Elements; Path:Xpath;
So, Elements is defined as a base set of numbers 1 through to 255 (inclusive). Path0, Path1 and Path2 are defined as working variables within the program which can hold any value from the range defined in Elements.
In the code itself:
Path0:=; FOR i:=1 TO Num DO BEGIN Valve:=Config.Ident[Order[i].Rv]; WRITELN(' ',Valve); Path:=Pathmatrix[Order[i].Rv]; Path1:=;Path2:=; FOR z:=1 TO Path DO Path1:=Path1+[Path[z]]; Path2:=Path1-Path0; Path0:=Path0+Path2; Design(Order[i].Rv) END; Printout(Order[i].Rv); END
Path0 is initialised (assigned an empty set) Path0:=
Path1:=Path1+[Path[z]]; Combines set Path1 and an element of array Path Path2:=Path1-Path0; removes set path0 from set path1 Path0:=Path0+Path2; combines sets path0 and path2
if a specific value appears in more than one set, then the other duplicate value is ignored. That is, only one instance of the value is copied to the new set.
MY QUESTION IS,
HOW IS THIS REPLICATED IN VB. I am converting to excel VB. I am naively hoping the solution is as simple as calling a subroutine...