uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Reza Hay"<reza...@gmail.com>
Subject Global variables containing types become null after their assignment scope.
Date Wed, 14 Jun 2017 12:34:05 GMT
Hi All,

It seems if a global variable does contain a type instead of a primitive value, its scope
is limited to the current statement. Example:
STRING s;
TYPE rootGovernor;
(DEP_ROOT & VERB) {-> rootGovernor = DEP_ROOT.Governor, LOG("root: " + rootGovernor.ct)};
ANY{->LOG("root: " + rootGovernor.ct)};

The first statement prints the correct answer but the second statement prints null. However,
in 
(DEP_ROOT & VERB) {-> s = DEP_ROOT.Governor.ct};
ANY{->LOG("root: " + s)};

the variable s has still its value and the second statement prints the expected value. Any
idea?

Regards,
Reza



Mime
View raw message