[solved]Lazarus expecting Char to write into array of string... lazarus / 31-LCL ---------------------------------------------------------------------- nidrax · 2012-03-31 15:03 I have declared a dynamic array of string: a: array of string; but when I try to write a string into it I get an error: Unit1.pas(112,33) Error: Incompatible types: got "AnsiString" expected "Char". for line a[b,c]:=t; : Code: [Select]                        readln(f,t);                         a[b,c]:=t; Why is that? ---------------------------------------------------------------------- eny · 2012-03-31 15:08 What is b? What is c? What is t? I'm guessing you need something like: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i a[b] := tor Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i a[b][c] := t[c]; ---------------------------------------------------------------------- nidrax · 2012-03-31 15:11 a is the array identifier b is the int that indicates the column number c is the int that indicates the row number. I think I got the wrong thing... a is suposed to be two-dimmensional array, but I only declared one dimmension: SetLength(a, pytan); That is probably the problem. @edit Now I get SIGSEGV at trying to set array: a: array of array of string; SetLength(a, 6, pytan); the variable pytan is an int that counts the number of rows in a text file. @edit2 Okay, I fixed it. I didn't consider that SetLength sets legth of array from 0 to x, and I set a for loop to use the rows from 1 to x+1 and some similar errors related with that.