How get string from skip in DOORS DXL -
i using following code string skip function. getting integer numbers. appreciate if can me out.
int csvtoskip(string csv, skip skip, char delimeter) { int = 0 int j = 0 int index = 0 (i = 0; < length(csv); i++) { if (csv[i] == delimeter) { put(skip, 0, "1") j = + 1 } else if (i == length(csv) - 1) { put(skip, 1, "2") } } return(index) } skip myskip=create; string test="hi test;for test"; char delimiter =';'; int x=csvtoskip(test, myskip, delimiter ); print x; svalue in myskip { print (int key myskip) " " svalue "\n"; }
this gives me following result
0 0 204534013 1 204534015
you did not declare svalue, dxl guessed wrongly data type values have.
the first chapter of dxl manual -> language fundamentals, called "auto-declare", explains how can disable auto-declare functionality. if this, doors warn when access undeclared variables.
Comments
Post a Comment