I am new to the thinkscript and this site.
I am trying to generate text for a watchlist that is n characters long. Basically I want to replicate a Character. In Excel it would be =REPT("x",4) where I am replicating the character "x", 4 times. --> "xxxx". I have tried fold but I can not get it to work. Here is my attempt.
Def RepCnt = 5;
Def upPoints = fold i = 1 to RepCnt with p = "" do Concat(p,"x");
Any Ideas? Thanks _ I get the feeling the problem is with the Text definition.
I am trying to generate text for a watchlist that is n characters long. Basically I want to replicate a Character. In Excel it would be =REPT("x",4) where I am replicating the character "x", 4 times. --> "xxxx". I have tried fold but I can not get it to work. Here is my attempt.
Def RepCnt = 5;
Def upPoints = fold i = 1 to RepCnt with p = "" do Concat(p,"x");
Any Ideas? Thanks _ I get the feeling the problem is with the Text definition.
Last edited: