HI,
I have List and CodeBlock, When one List ,can success the Loop,But Level List ,return Empty List,I don’t know how can i do, Please help me,Thanks.
hi there, what is the purpose of your code block actually? it should be really easy to fix, but in order to be able to help you, we should know what you are trying to achieve ![]()
Hello, here is an answer, I admit that I have trouble understanding what you are trying to achieve via this code block
(Afterwards, I’m not a strong person)
code block definition:
def sum_born(a:var[],b:int)
{
res= [Imperative]
{
newList=[];
sum=0;
for (i in a)
{
sum = sum+i;
if (sum>b)
{
newList=DSCore.List.Flatten([newList,sum-i]);
sum=i;
}
else
{
sum=sum;
}
}
return newList;
}
return res;
};
Cordially
christian.stan
Extremely grateful christian.stan,That’s it what i want !





