Aurel Page on Fri, 02 Sep 2022 22:41:34 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: setsearch() |
Dear all,
I would expect the function copied below to return a vector of zeros of length n, for any n. But it doesn't (for me, running Version 2.13.4), for n>9. Can someone explain to me why? and how to "fix" it?
Faithfully,
Johnf(n)=
{
local(v,ans);}
v=vector(n,i,Str(i));
ans=vector(n,i,setsearch(v,v[i],1));
ans;