I am using following code to get string from skip function. But i am getting integer numbers. I will appreciate if someone can help me out.
int csvToSkip(string csv, Skip skip, char delimeter)
{
int i = 0
int j = 0
int index = 0
for (i = 0; i < length(csv); i++)
{
if (csv[i] == delimeter)
{
put(skip, 0, "1")
j = i + 1
}
else if (i == length(csv) - 1)
{
put(skip, 1, "2")
}
}
return(index)
}
Skip mySkip=create;
string test="hi this is test;for another test";
char delimiter =';';
int x=csvToSkip(test, mySkip, delimiter );
print x;
for sValue in mySkip do
{
print (int key mySkip) " " sValue "\n";
}
This gives me following result
0
0 204534013
1 204534015
You did not declare sValue, so DXL guessed wrongly what data type the values have.
The first chapter of DXL Manual -> Language fundamentals, called "Auto-Declare", explains how you can disable the auto-declare functionality. If you do this, DOORS will warn you when you access undeclared variables.