24.05.2014 Views

XL Fortran Enterprise Edition for AIX : User's Guide - IBM

XL Fortran Enterprise Edition for AIX : User's Guide - IBM

XL Fortran Enterprise Edition for AIX : User's Guide - IBM

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

-qextname Option<br />

Syntax<br />

-qextname[=name1[:name2...]] | -qnoextname<br />

EXTNAME[(name1: name2:...)] | NOEXTNAME<br />

Adds an underscore to the names of all global entities, which helps in porting<br />

programs from systems where this is a convention <strong>for</strong> mixed-language programs.<br />

Use -qextname=name1[:name2...] to identify a specific global entity (or entities).<br />

For a list of named entities, separate each name with a colon.<br />

The name of a main program is not affected.<br />

The -qextname option helps to port mixed-language programs to <strong>XL</strong> <strong>Fortran</strong><br />

without modifications. Use of this option avoids naming problems that might<br />

otherwise be caused by:<br />

v <strong>Fortran</strong> subroutines, functions, or common blocks that are named main, MAIN,<br />

or have the same name as a system subroutine<br />

v Non-<strong>Fortran</strong> routines that are referenced from <strong>Fortran</strong> and contain an underscore<br />

at the end of the routine name<br />

v<br />

v<br />

Note: <strong>XL</strong> <strong>Fortran</strong> Service and Utility Procedures, such as flush_ and dtime_,<br />

have these underscores in their names already. By compiling with the<br />

-qextname option, you can code the names of these procedures without<br />

the trailing underscores.<br />

Non-<strong>Fortran</strong> routines that call <strong>Fortran</strong> procedures and use underscores at the<br />

end of the <strong>Fortran</strong> names<br />

Non-<strong>Fortran</strong> external or global data objects that contain an underscore at the end<br />

of the data name and are shared with a <strong>Fortran</strong> procedure<br />

If your program has only a few instances of the naming problems that -qextname<br />

solves, you may prefer to select new names with the -brename option of the ld<br />

command.<br />

Restrictions<br />

You must compile all the source files <strong>for</strong> a program, including the source files of<br />

any required module files, with the same -qextname setting.<br />

If you use the xlfutility module to ensure that the Service and Utility subprograms<br />

are correctly declared, you must change the name to xlfutility_extname when<br />

compiling with -qextname.<br />

If there is more than one Service and Utility subprogram referenced in a<br />

compilation unit, using -qextname with no names specified and the<br />

xlfutility_extname module may cause the procedure declaration check not to work<br />

accurately.<br />

158 <strong>XL</strong> <strong>Fortran</strong> <strong>Enterprise</strong> <strong>Edition</strong> <strong>for</strong> <strong>AIX</strong> : User’s <strong>Guide</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!