Re: Doubling \\ in file names
- Posted by aku saya <akusaya at gmx.net> Jun 18, 2003
- 389 views
You need to type double backslashes ONLY in source files (*.ex, *.exw), not in anything outside it. For example if you make code like this puts(1, "Enter a file name: ") filename = gets(0) -- prompt a file name -- then user types: c:\abc\def.ext fn = open(filename, "r") You don't need to convert the contents of variable "filename" to double backslashes for the open() function. YOu need double backslashes ONLY in source files. Not the others. I think the extractIcon() is not compatible with picturebutton, not because of the backslash thing. ______________________________________________ R> Hi All R> I think that I am having trouble because of needing to double back R> slashes in a file name for various GUI commands such as extractIcon. If R> I have a file name with single back slashes then is there some function R> that will make them all double or am I doing something daft? R> What is the rule on what things treat "\" in text in this way (i.e. as a R> special escape character)? Is it always the case in all text strings, R> or do some just have normal single "\" in file names? R> I am using create( PictureButton, ... and want to put an extractIcon(f) R> command directly in as a parameter for the picture icon and it seems the R> reason for failure is that f has single back slashes. R> I am going to have a working program soon! R> Ray