Solution on perform -> end-perform problem.
This commit is contained in:
@ -1716,9 +1716,20 @@ namespace CobXmlSupport
|
|||||||
}
|
}
|
||||||
//obs under development
|
//obs under development
|
||||||
|
|
||||||
|
fromToMoves.CodeShower.Text += "IF "+ tmpQfh.qualCobRow.CountIn.ToString()+ " > 0 \r\n";
|
||||||
fromToMoves.CodeShower.Text += "MOVE " + tmpQfh.ToString();
|
fromToMoves.CodeShower.Text += "MOVE " + tmpQfh.ToString();
|
||||||
fromToMoves.CodeShower.Text += "TO " + tmpQfh.ToExpString();
|
fromToMoves.CodeShower.Text += "TO " + tmpQfh.ToExpString();
|
||||||
|
fromToMoves.CodeShower.Text += "ELSE \r\n";
|
||||||
|
fromToMoves.CodeShower.Text += "MOVE 0 TO " + tmpQfh.qualCobRow.CountIn.ToString().Replace(S.ettingPrefix, S.ettingExpPrefix) + "\r\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
indSt.handleStatus(null);
|
||||||
|
for (int i = 0; i < indSt.Returns; i++)
|
||||||
|
{
|
||||||
|
fromToMoves.CodeShower.Text += "END-PERFORM" + "\r\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
fromToMoves.Show();
|
fromToMoves.Show();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Diagnostics;
|
||||||
|
|
||||||
namespace CobXmlSupport
|
namespace CobXmlSupport
|
||||||
{
|
{
|
||||||
@ -9,7 +10,7 @@ namespace CobXmlSupport
|
|||||||
{
|
{
|
||||||
private List<string> presentInds = null;
|
private List<string> presentInds = null;
|
||||||
private int returns = 0;
|
private int returns = 0;
|
||||||
private string[] newInds=null;
|
private string[] newInds = null;
|
||||||
|
|
||||||
public IndStatus()
|
public IndStatus()
|
||||||
{
|
{
|
||||||
@ -22,18 +23,40 @@ namespace CobXmlSupport
|
|||||||
/// <param name="new_Inds">innehåller en string array med aktuella index för den kommande variabeln</param>
|
/// <param name="new_Inds">innehåller en string array med aktuella index för den kommande variabeln</param>
|
||||||
public void handleStatus(string[] new_Inds)
|
public void handleStatus(string[] new_Inds)
|
||||||
{
|
{
|
||||||
|
Debug.WriteLine("------- present indexs -------");
|
||||||
|
foreach (string prind in presentInds.ToArray())
|
||||||
|
{
|
||||||
|
Debug.Write(prind + ", ");
|
||||||
|
}
|
||||||
|
Debug.WriteLine("");
|
||||||
|
Debug.WriteLine("------- new indexs -------");
|
||||||
|
|
||||||
|
if (new_Inds != null)
|
||||||
|
{
|
||||||
|
foreach (string nind in new_Inds)
|
||||||
|
{
|
||||||
|
Debug.Write(nind + ", ");
|
||||||
|
}
|
||||||
|
Debug.WriteLine("");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Debug.WriteLine(" = null ");
|
||||||
|
|
||||||
|
|
||||||
returns = 0;
|
returns = 0;
|
||||||
List<string> news = new List<string>();
|
List<string> news = new List<string>();
|
||||||
if(new_Inds!=null) news.AddRange(new_Inds);
|
if (new_Inds != null) news.AddRange(new_Inds);
|
||||||
|
|
||||||
foreach (string tmpStr in presentInds.ToArray())
|
foreach (string tmpStr in presentInds.ToArray())
|
||||||
{
|
{
|
||||||
if (news.Contains(tmpStr)) {}
|
if (news.Contains(tmpStr)) { }
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
presentInds.Remove(tmpStr);
|
presentInds.Remove(tmpStr);
|
||||||
returns += 1;
|
returns += 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
List<string> addedStrs = new List<string>();
|
List<string> addedStrs = new List<string>();
|
||||||
if (new_Inds != null)
|
if (new_Inds != null)
|
||||||
{
|
{
|
||||||
@ -51,9 +74,28 @@ namespace CobXmlSupport
|
|||||||
{
|
{
|
||||||
newInds = addedStrs.ToArray();
|
newInds = addedStrs.ToArray();
|
||||||
}
|
}
|
||||||
|
else newInds = null;
|
||||||
|
|
||||||
|
Debug.WriteLine("------- returns -------");
|
||||||
|
Debug.Write(returns);
|
||||||
|
Debug.WriteLine("");
|
||||||
|
|
||||||
|
Debug.WriteLine("------- tillagda Inds -------");
|
||||||
|
if (newInds != null)
|
||||||
|
{
|
||||||
|
foreach (string tlind in newInds)
|
||||||
|
{
|
||||||
|
Debug.Write(tlind + ", ");
|
||||||
|
}
|
||||||
|
Debug.WriteLine("");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Debug.WriteLine(" = null ");
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public int Returns
|
public int Returns
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|||||||
@ -14,6 +14,14 @@ namespace CobXmlSupport
|
|||||||
private string qfhCode, qfhInd ;
|
private string qfhCode, qfhInd ;
|
||||||
private string[] indexStrs;
|
private string[] indexStrs;
|
||||||
|
|
||||||
|
public CobRow qualCobRow
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return qualifiedRow;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public string indexText
|
public string indexText
|
||||||
{
|
{
|
||||||
get { return qfhInd; }
|
get { return qfhInd; }
|
||||||
|
|||||||
Reference in New Issue
Block a user