Loadcase using an array element as an ID

Other discussions about CSPro
AriSilva
Posts: 165
Joined: July 22nd, 2016, 3:55 pm

Loadcase using an array element as an ID

Postby AriSilva » June 13th, 2018, 6:01 pm

array string a(10);
string x;
loadcase(dict, a(1)); //compiler error
loadcase(dict, x); //ok
Best
Ari

Gregory Martin
Posts: 1033
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Loadcase using an array element as an ID

Postby Gregory Martin » June 13th, 2018, 6:16 pm

You'll see that that is the same with a string list. The string object is implemented like a dictionary variable, which is why loadcase happens to work with it, though that function is really intended to take dictionary variables.

If you really need to use an array, you should be able to do this:

if locate(dict, =, a(1)) and loadcase(dict) then


Return to “Other”