A list for the developers of CellML tools

Text archives Help


[cellml-dev] Question about CellMLVariableSets


Chronological Thread 
  • From: lpsmith at spod-central.org (Lucian Smith)
  • Subject: [cellml-dev] Question about CellMLVariableSets
  • Date: Fri, 16 Sep 2011 18:34:52 +0100

I have the following code in my program:

while (cmlvar != NULL) {
//A variable with that name already exists; create a new one instead.
cmlvarst = makeUTF16(varname + "_" + SizeTToString(varnum));
RETURN_INTO_OBJREF(cmlvar, iface::cellml_api::CellMLVariable,
cmlvarset->getVariable(cmlvarst.c_str()));
varnum++;
}

It is looking for a new unique name that does not yet exist in the
variable set 'cmlvarset', by checking 'name_0', 'name_1', 'name_2', etc.

Unfortunately, it loops forever. I think this is because 'cmlvar' is not
ever NULL, but some other pointer that points to NULL or something.
Anyone know how I can fix this? Thanks!

-Lucian



  • [cellml-dev] Question about CellMLVariableSets, Lucian Smith, 09/17/2011

Archive powered by MHonArc 2.6.18.

Top of page