Hi All, Recently, while updating Ian's SVGL to import some SVG archives that you could download from OpenClipart.org I found an error processing this number: 80.26.12
This looks like a number with two decimal points but it's a shorthand for two numbers that some SVG editors use to save space by replacing two numbers like 80.26 0.12 with a single word like this: 80.26.12 Notice that two characters: " 0" (a space and number zero) are missing. Quickly, I scripted a workaround like this: Function ConvertWordtoNumbers pWordN put pWordN into tWordNumber -- pWordN contains "80.26.12" if "." is in tWordNumber then replace "." with cr in tWordNumber if the number of lines of tWordNumber = 3 then return line 1 of tWordNumber & "." & line 2 of tWordNumber && "0." & line 3 of tWordNumber else return pWordN -- unchanged word or unchanged number end if else return pWordN end if end ConvertWordtoNumbers My question is: How could you rewrite this code to make it more elegant, faster, efficient and cover an extreme case like this: 10.26.12.47.38.52.71 (6 numbers in a single word) 10.26 0.12 0.47 0.38 0.52 0.71 Autotracing applications could produce curves as unusual as these. Thanks in advance! Al _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode