Text variable problem

stevex64 stevex64 at yahoo.com
Sun May 24 00:10:41 EDT 2009


Hi Forum,

I have a very irritating problem occurring. In one part of my program a
global variable, g_region, is set to the name of a US state or Canadian
province. Later in the program there is a loop that compares the 17th
element of the line to g_region. If g_region and element 17 of the line are
the same, the program does something. Using the variable watcher, I can see
that g_region is set to a states name, and I can see that the 17th element
of the line is the same state as g_region. But the loop doesn't acknowledge
that the two are equivalent. I have tried :

"repeat for each line regLine in lData
   if item 17 of regLine = g_reg then //and I've tried "is" in place of the
equals sign, too.
      put item 17 of regLine into regFiltered
   end if
end repeat"

lData is just lines from a field being dropped into a variable. I tested
lData with "put the number of lines in lData", and it shows the correct
number of lines that I know are in that field.

In the very next line I test g_region with "put g_region", and it puts the
correct g_region value.

But if item 17 of regLine is, say, Texas and g_region is Texas, the loop
doesn't see them as being equivalent for some reason.

Any thoughts?

Thanks,

Steve Ralston
-- 
View this message in context: http://www.nabble.com/Text-variable-problem-tp23690465p23690465.html
Sent from the Revolution - User mailing list archive at Nabble.com.




More information about the use-livecode mailing list