I am trying to create a filter on null values and the filter is not working. Is showing data with values.
print length((current Object)."Deviation""")""
filtering off
for obj in current Module do{
string s = obj."Deviation"""
int len = length(s)
if(len > 0){
if(len == 1){
char c = s[len]
print (intOf c)"\t"
}
print identifier(obj) "\t" len "\t Accept\n"
accept obj
}
else{
print identifier(obj) "\t" len "\t Rejected\n"
reject obj
}
}
filtering on
SystemAdmin - Wed Apr 11 17:24:25 EDT 2012 |
Re: Filtering on Null Value Perhaps you meant the script to be the other way around - swap the "reject obj" and "accept obj" functions. Paul Miller Melbourne, Australia |
Re: Filtering on Null Value
By the way, this code will not work:
if(len == 1) {
char c = s[len] // use len-1 here, string begin with a 0 index
print (intOf c)"\t"
}
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
|
Re: Filtering on Null Value Mathias Mamsch - Mon Apr 16 05:23:50 EDT 2012
By the way, this code will not work:
if(len == 1) {
char c = s[len] // use len-1 here, string begin with a 0 index
print (intOf c)"\t"
}
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
Yes. This illustrates it:
void PrintString(string in_String)
{ int len = length(in_String), i
char c
print "[[" in_String "]]\n"
for (i=0; i<len; i++)
{ c = in_String[i]
print "\t" i "\t[" c "]\t" (intOf(c)) "\n"
}
}
PrintString("Hello")
|