MATLAB: 2012b not backwards compatible

backwards compatibilityMATLABr2012b

Hi, I've installed 2012b yesterday, and to my big dissapointment, it seems that this version does not admit any more names of m files separated by spaces.
If this is true, then I will have to go over my old files and rename every space to something with an "_", as i used to do 15 years ago with Fortran.
So please tell me this is not true, or if it is, tell me why having to go over all my old programs and change the names is good for me.
Thanks a lot,
Gustavo Wolf

Best Answer

Spaces in names of M-files did never work in Matlab.
delete('temp file.m')
The name of the file should match the name of the first function in the file. Valid function names begin with an alphabetic character, and can contain letters, numbers, or underscores.
Onc could claim that only the function name must be valid, but the file name is allowed to differ. But remember that the file name determines which function is called. And when you have three function files like the following, spaces would make a valid parsing impossible:
fun1.m
fun2.m
fun1 fun2.m
What should happen for this line:
fun1 fun2
?!
PS. I have a MEX-tool to use spaces, control characters and even the empty string as fieldnames of a struct. While dynamic fieldnames work perfectly, e.g. S.(' '), the M-File parser rejects these names in the code and this files: |S. | (a space after the dot). What a pitty.
Related Question