dim x for i=1 to 5 for j=1 to 5 x="" next j next i ch=OPEN("text",”voda.txt”,"separator='\t', mode=ro, Library") iLine=1 nr=INPUT(ch, iLine, 1, v1, v2, v3, v4, v5) WHILE nr>-1 DO !just to limit, original text filex has >50 rows if nr then x[iLine] = v1 x[iLine] = v2 x[iLine] = v3 x[iLine] = v4 x[iLine] = v5 else add2 0, -1 !empty row endif iLine=iLine+1 nr=INPUT(ch, iLine, 1, v1, v2, v3, v4, v5) ENDWHILE CLOSE ch for iLine=1 to 5 for j=1 to 5 text2 5*(j-1),1-iLine,x[iLine] next j next iLine x="a b c" !without it X_array stays empty; with it x is overwritten and first column and row stays empty, BUT rest values are correct. why ?!! parameters x=xbut idk why "parameters x=x" has no effect. I mean when I check "x" parameter it remains empty (if comment x='abc'). Because after closing reading the file text2 cycles show proper values in 2D view (without it I'd think that code is wrong and it even didn't read the file). So array should have correct values, I guess.
----->”voda.txt”<--------- 0 4 6 8 10 1 0,22 0,28 0,33 0,39 2 0,23 0,29 0,34 0,40 3 0,25 0,30 0,36 0,42 4 0,26 0,32 0,38 0,44
Solved! Go to Solution.
Podolsky wrote:It's my first try of text Add-On. So, unfortunately, it could be anything... here is 7z archieve
Strange that it's not working properly.
Is it your first try of using txt Add-On?
I wrote some tools based on txt database - and it actually worked. Several years on different platforms, computers and versions.
Another question - what you shared here it's all you have got or just fragment of bigger object / system - anything you are developing? Maybe, if you are saving in txt only numbers, try to read them as numbers? Just set your x array as numbers. This is also annihilating the problem with zero, I mentioned before, because this problem exist only with string variables. In case of integer zero will be zero.
A = "" nr=INPUT(ch, 1, 1, A)causes weird issues, while
A =0 nr=INPUT(ch, 1, 1, A)works.