Hi all,
in Eagle 6.4.0 the following ULP produces an unexpected (at least to
me 8-) output (see attached screenshot)
int pCnt, i;
string pPrefix[];
int pX [];
int pY [];
int pIndex [];
pPrefix[pCnt] = "A"; pX[pCnt] = 5; pY[pCnt++] = 3;
pPrefix[pCnt] = "A"; pX[pCnt] = 5; pY[pCnt++] = 9;
pPrefix[pCnt] = "A"; pX[pCnt] = 2; pY[pCnt++] = 1;
pPrefix[pCnt] = "A"; pX[pCnt] = 2; pY[pCnt++] = 2;
pPrefix[pCnt] = "A"; pX[pCnt] = 1; pY[pCnt++] = 1;
pPrefix[pCnt] = "A"; pX[pCnt] = 1; pY[pCnt++] = 2;
pPrefix[pCnt] = "A"; pX[pCnt] = 5; pY[pCnt++] = 1;
pPrefix[pCnt] = "A"; pX[pCnt] = 5; pY[pCnt++] = 2;
sort(pCnt, pIndex, pPrefix, pX, pY);
numeric string dStr[];
for (i=0; i<pCnt; i++)
sprintf(dStr[i], "%d\t%s\t%d\t%d\t%d", pIndex[i], pPrefix[i], pX[i],
pY[i], i);
dlgDialog("Parts")
{
int sel = -1;
dlgListView("Index\tPrefix\tx\ty\t", dStr, sel);
};
Am I doing something wrong?
The result changes depending on the sequence of array assignements, by
the way.
--
Lorenz
