At 02.20 -0500 03-02-26, 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,

Citing the Director online help:

-Symbols are not case sensitive.
-Symbols can't start with a number.
-Spaces may not be used, but you can use underscore characters to simulate them.
-Periods may not be used in symbols.


You will have to either

a) Find & replace "." with "_" and then convert it back later

or

b) Chop off .mp3, and then append it later on, when you're extracting the string from the symbol again. (which would assume that ALL symbol names should have a .mp3 appendix)


-A.


[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!]

Reply via email to