Put URL failing -- HTTP header problems?

Tereza Snyder tereza at califex.com
Wed May 10 09:18:47 EDT 2006


On May 9, 2006, at 11:43 PM, Sivakatirswami wrote:

This is the loop where you say a spurious char[13] is being introduced:

> REPEAT for each line tOneGenus in tTestList
>         --> extract the genus name first
>         set the itemdel to "/"
>         put item 5 of tOneGenus into tGenus
>         put tGenus after tGeni
>         delete item -1 of tOneGenus
>         put tOneGenus & cr after tURLs
>         put url (tOneGenus) into tOneGenusPage
>         --> from each page we have to extract the species URLs
>         REPEAT for each line x in tOneGenusPage
>             IF x contains ("/" & tGenus & "/") THEN put x & cr  
> after tSpeciesPages
>         END REPEAT
>
>     END REPEAT


One thing set off an alarm for me. You delete an item out of the loop  
variable tOneGenus:

delete item -1 of tOneGenus
put tOneGenus & cr after tURLs

Generally, I avoid manipulating these variables; I treat them as read- 
only. I'm not sure why, but for me it's taboo. What happens if you  
replace those lines with:

put (item 1 to -2 of tOneGenus) & cr after tURLs

?

tereza


-- 
Tereza Snyder

    Califex Software, Inc.
    800 Water Street
    Sauk City, WI 53583
    608.643.2586
    AIM: terezasnyder1




More information about the use-livecode mailing list