Text variable problem

stevex64 stevex64 at yahoo.com
Sun May 24 00:37:39 EDT 2009


I haven't changed Rev's delimiter programatically. The values in the lines of
the field are delimited by commas. Just now as I looped through, having
selected Texas to be g_reg, I put this:

put item 17 of regLine & ","  & g_reg & the itemDelimiter

And the output is:

Texas,Texas,

Thank you so much for your very very fast reply!



Richard Gaskin wrote:
> 
> stevex64 wrote:
> 
>> 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?
> 
> What is the itemDelimiter set to while this is running, and does it 
> match the character used to delimit the values in regLine?
> 
> --
>   Richard Gaskin
>   Fourth World
>   Revolution training and consulting: http://www.fourthworld.com
>   Webzine for Rev developers: http://www.revjournal.com
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
> 
> 

-- 
View this message in context: http://www.nabble.com/Re%3A-Text-variable-problem-tp23690520p23690569.html
Sent from the Revolution - User mailing list archive at Nabble.com.




More information about the use-livecode mailing list