SubsetGetElementName loop
Posted: Thu Jul 18, 2024 8:26 am
Hi,
would anyone have any idea why the following would enter into an infinite loop:
This runs normally when I comment out sPosition inside the loop:
Moreover and equally baffling if I add an Asciioutput under the sPosition line within the loop I get an error when saving (equal sign not found) but if I add the Asciioutput after the nLoopcount = nLoopcount +1; line within the loop it saves ok.
Maren
would anyone have any idea why the following would enter into an infinite loop:
Code: Select all
sDimName = 'Position';
sSub = 'N_Level_Position';
sDimSize = SubsetGetSize(sDimName, sSub);
sPosition = '';
nLoopcount = 1;
WHILE( nLoopcount <= sDimSize );
sPosition = SubsetGetElementName(sDimName,sSub,nLoopcount);
nLoopcount = nLoopcount +1;
END;
This runs normally when I comment out sPosition inside the loop:
Code: Select all
sDimName = 'Position';
sSub = 'N_Level_Position';
sDimSize = SubsetGetSize(sDimName, sSub);
sPosition = '';
nLoopcount = 1;
WHILE( nLoopcount <= sDimSize );
#sPosition = SubsetGetElementName(sDimName,sSub,nLoopcount);
nLoopcount = nLoopcount +1;
END;
Maren