- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is the warning I get when trying to compile a set of Fortran routines:
>> mex count.f90 C:\\Users\\admin\\Documents\\MATLAB\\work\\*.for
count.f90(103): warning #5275: The backslash character and following character is not a valid escape sequence
character*32, parameter :: base_dir='C:\\Program Files\\Matlab\\liquids\'
To me it seems all right and I have no idea what to change. Any clues?
cheers
>> mex count.f90 C:\\Users\\admin\\Documents\\MATLAB\\work\\*.for
count.f90(103): warning #5275: The backslash character and following character is not a valid escape sequence
character*32, parameter :: base_dir='C:\\Program Files\\Matlab\\liquids\'
To me it seems all right and I have no idea what to change. Any clues?
cheers
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You have the /assume:backslash option on which tries to interpret backslashes in character strings as C escape sequences. Remove it. If "mex" won't allow you to do that, try adding "/assume:nobackslash" to the command line.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks a lot, this looks promising... thing is not surprisingly it is not listed in the options available from Matlab in the mex -sth syntax, so i thought i would change it in one of the Visual Fortran Compiler *.stp files in mexopts directory but cannot find this phrase anywhere...
once again cheers and would be great to hear more from you or someone else
once again cheers and would be great to hear more from you or someone else
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am not familiar with how Matlab does its compiles. This "*.stb" must be a Matlab thing. The key here is that something is telling the compiler to enable this option, which is not on by default.
You may also want to look at ifort.cfg in the compiler's BIN folder - someone may have edited that.
You may also want to look at ifort.cfg in the compiler's BIN folder - someone may have edited that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are you sure it is /assume:nobackslash? Because the Matlab .stp file has /assume:bscc (I don't know why The MathWorks did this!) which seems to be turning the feature on , and I think it is/assume:nobscc to turn it off.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
/assume:[no]bscc is correct. Sorry for the earlier error.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page