Solution on perform -> end-perform problem.

This commit is contained in:
2014-12-08 13:58:40 +01:00
parent 9b4f39834f
commit 1a78dcc16d
3 changed files with 66 additions and 5 deletions

View File

@ -1716,9 +1716,20 @@ namespace CobXmlSupport
}
//obs under development
fromToMoves.CodeShower.Text += "IF "+ tmpQfh.qualCobRow.CountIn.ToString()+ " > 0 \r\n";
fromToMoves.CodeShower.Text += "MOVE " + tmpQfh.ToString();
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();
}

View File

@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
namespace CobXmlSupport
{
@ -22,6 +23,26 @@ namespace CobXmlSupport
/// <param name="new_Inds">innehåller en string array med aktuella index för den kommande variabeln</param>
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;
List<string> news = new List<string>();
if (new_Inds != null) news.AddRange(new_Inds);
@ -29,11 +50,13 @@ namespace CobXmlSupport
foreach (string tmpStr in presentInds.ToArray())
{
if (news.Contains(tmpStr)) { }
else {
else
{
presentInds.Remove(tmpStr);
returns += 1;
}
}
List<string> addedStrs = new List<string>();
if (new_Inds != null)
{
@ -51,9 +74,28 @@ namespace CobXmlSupport
{
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
{
get

View File

@ -14,6 +14,14 @@ namespace CobXmlSupport
private string qfhCode, qfhInd ;
private string[] indexStrs;
public CobRow qualCobRow
{
get
{
return qualifiedRow;
}
}
public string indexText
{
get { return qfhInd; }