------- Comment #3 from dominiq at lps dot ens dot fr 2009-04-07 09:12 ------- > Question is, if this is allowed at all. In comparison: digits are allowed in > function names, but not as the first character; 'FUNCTION f3()' is valid, > 'FUNCTION 3f()' is not.
My fortran book says: names must consist of between 1 and 31 alphanumeric characters (letters, underscores, and numerals) of which the first MUST BE A LETTER. > Does this apply to '$' as well? Since '$' is an extension, you know the answer! It is outside the scope of the standard. BTW what should be the implict type of a variable starting with a $? Now I am not sure that, in the relics of past, names starting with a '$' had some side effects. I don't think it is likely to change this extension in gfortran. For the legacy code, the workaround depends on the kind of the variables starting with a '$'. If they are all of the same kind (say integer) then it is trivial with you favorite editor to replace all the '$name' by 'izzname' or 'i$name' (may be with some filters if you have $ elsewhere). > My personal opinion is that the Fortran compiler's primary use is support of > the legacy code. This is your personnal opinion, not mine and probably not of anyone coding in fortran. In addition I have always been very suspicious about the validity of the port of such "legacy" codes. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39670