Symbols aren't really meant to be exact string holders. They are a shortcut to give you string-like recognition (visual) without the overhead of strings. They're not meant to be a container for shipping strings around.
Two solutions:
1) Prepend a number to the string, always, like symbol("9" & filename)
Sort of cheezy, but it should work. Of course, you'll always have to take the front digit off again when converting back to a filename, but it gets around a problem.
2) Instead use a list and pass around the index into that list. How you would structure this depends on what you're trying to accomplish. But it's much more likely to preserve your data, and should be effectively just as fast.
- Tab
At 02:20 AM 2/26/03, Slava Paperno wrote:
Friends,
I use symbol(MyFilename) as a property in a list.
MyFilename is a string that contains the filename extension, e.g. "01.mp3"
The problem is that some mp3 files I'm using begin with a letter while others begin with a digit. The results are very different:
put symbol("01.mp3") --#01.mp3 put symbol("s01.mp3") --#s01
The filename extension is chopped off.
Is there a way I can obtain consistent results no matter what the first character of the filename is? I do need to keep the filename extension in the symbol variable.
Thanks for any tips!
Slava
[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]
