Posted 8 May 2017 regards how can i declare a string variable on sysmac? can you bring me an example? ex. var _a = type array[0..2] of string[20] how can i put this string "hello world" on var_a[x]? var_a[x]:="hello world" that is correct? thanks Share this post Link to post Share on other sites
Posted 9 May 2017 Name Data Type Initial Value var_a ARRAY[0..2] OF STRING[20] ['hello world 1', 'hello world 2', 'hello world 3'] If you input STRING[20][3] in the Data Type field it will convert it automatically to look like the above. You don't have to populate the Initial Value field. You can write to it at runtime. Share this post Link to post Share on other sites
Posted 9 May 2017 thanks io_rack so can i to put this in my code? ex. Name Data Type Initial Value var_a STRING[20][3] = 4 strings of 20 right? or =( STRING[20][1],STRING[20][2],STRING[20][3]) var_a[0]:='hello' //this is correct? the value asigned to my first string of 20 its equal to 'hello'? var_a[1]:='world' //var_a[1] contains the string 'world'? regardas Share this post Link to post Share on other sites
Posted 10 May 2017 Yes, I believe that is correct. Have you tried it in the simulator? Share this post Link to post Share on other sites