I have a peice of code that is to create a Location Matrix in a queue file it is made up of 4 elements these are
row, colum, depth and side
the Queue file will be a string format so i am no trying to create a piece of code that will build this file without me having to type all the combunations locations.
the code has 2 if statments and 4 loop statments to work thourgh each possible conbitantion,
then it convertes the Integers in to Strings then add them together to create one string for each location and then put each one in to a Queue File.
the error i am getting is in the first For Loop it say syntax error near <to>
i have placed the code below this statment.
I know the code is not fully complete there is still the second set of for loops after the else but that is the same just if the Side is one or two so it is a repeat of this code.
if you could offer some adivice on what i am doing wrong or what i could do differently.
row : integer; Colum : integer; side : integer; side_total : integer; side_ref : string; Location_ref : string; row_ref : string; Colum_ref : string; row_total : integer; Colum_total : integer; Depth_ref : string; Depth_total : integer; Depth : integer;
Row_total := How_Many_Bays_X; Colum_Total := How_Many_Bays_Y; Depth_Total := How_Many_Bays_Z; Row := 1; Colum := 1; Depth := 1; Side := 1; if Number_of_Lanes_Per_Track == 2 then for Side to 2 loop if Side == 1 then Side_Ref := L; else Side_Ref := R; end; for Depth to Depth_Total loop for Column to Colum_Total loop for Row to Row_Total loop Row_ref := num_to_str(Row); Colum_ref := num_to_str(Colum); Depth_ref := num_to_str(Depth); Location_ref := (Row_Ref+Colum_Ref+Depth_Ref+side_Ref) Location_Matrix.insert(Location_ref); next; next; next; next; else Side_ref := L; for Depth to Depth_Total loop for Column to Colum_Total loop for Row to Row_Total loop next; next; next; end;
Solved! Go to Solution.
Thats great thanks found that after i posted this problem, the next issue i have is inserting in to the Queue File using the
it is saying that the there is a syntax error near Location_Matrix.
could you give any adivice on this issue thats.
also is the creating of the Location_ref string correct?