Loadcase using an array element as an ID

Other discussions about CSPro
Forum rules
New release: CSPro 8.0
Post Reply
AriSilva
Posts: 591
Joined: July 22nd, 2016, 3:55 pm

Loadcase using an array element as an ID

Post by AriSilva »

array string a(10);
string x;
loadcase(dict, a(1)); //compiler error
loadcase(dict, x); //ok
Best
Ari
Gregory Martin
Posts: 1777
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Loadcase using an array element as an ID

Post by Gregory Martin »

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
Post Reply