I’ve been trying to create a list of strings to name load cases in a loop.
However, it would seem that it’s not possible to interact with a list of strings after it’s created, is that really true?
Please see the example code piece below:
+prog template
head List of strings
let#list1 1,2,3
prt#list1
let#list2 'A','B','C'
prt#list2
let#list3 #list1(:)
prt#list3
let#list4 #list2(:)
prt#list3
end
If you want to increase the title of an load case set, try to use the following code snippet. The first short code creates a load case with the title “2C”.
Okay, I’d say that debugging your software is rather necessary, but I suppose priorities do vary.
Furthermore I’d suggest increasing the allowable string length to more than 8 characters as well.
While we are at the topic of Let-variables and their implementation:
There seems to be a difference in how whitespace is treated whether the type is a string or a numeric value.
The assignment to #list3 has a bug in it (inserting blanks in the vector).
Also: Are you supposed to be able to swap commas for whitespace?
I appreciate that you both are testing the software so thoroughly.
But in this case you are expecting functionalities that are not programmed for this use case.
As far as I know, string arrays should not be used. Just use one combination of literals for one Variable.
For example
LET#TEXT ‘Hello world’
and not
LET#TEXT ‘Hello’,’ world’
The behaviour of the string array in your short example is interesting, but I can’t explain why you get these results. Just stay away from string arrays