BlueM.Sim compilation: Difference between revisions

From BlueM
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 20: Line 20:
The Fortran language prohibits changing the definition status of an argument associated with a constant or expression. If your application needs to do so, you can specify the <code>/assume:noprotect_constants</code> option. (In the visual development environment, select project property '''Fortran..Data..Constant Actual Arguments Can Be Changed..Yes'''.) This will instruct the compiler to create and pass a temporary copy of the constant actual argument. The called procedure can change this copy which will be discarded when the procedure exits.
The Fortran language prohibits changing the definition status of an argument associated with a constant or expression. If your application needs to do so, you can specify the <code>/assume:noprotect_constants</code> option. (In the visual development environment, select project property '''Fortran..Data..Constant Actual Arguments Can Be Changed..Yes'''.) This will instruct the compiler to create and pass a temporary copy of the constant actual argument. The called procedure can change this copy which will be discarded when the procedure exits.
</blockquote>
</blockquote>
Das Setzen des oben genannten Flags betrifft allerdings nur benannte Konstanten, Literale (wie die '3' im Beispiel oben) können auch durch das Setzen des Flags nicht verändert werden. Um korrektes Fortran zu gewährleisten, sollte der Flag sowieso ''nicht'' gesetzt werden.


[[Category:BlauesModell]]
[[Category:BlauesModell]]

Revision as of 01:19, 17 July 2006

Use Bytes as RECL

Allgemeine Einstellungen

Compiler-Einstellungen (Flags), die zur erfolgreichen Kompilierung erforderlich sind.

  • Damit Intel Fortran bei unformatierten Dateien die Record-Länge als bytes und nicht als 4-byte Einheiten (longwords) interpretiert, muss folgender Flag gesetzt werden: "Use Bytes as RECL unit for unformatted files: Yes" (siehe Bild)

Intel Fortran 9.1

Aus den Release notes:

Constants Are Now Read-Only
Constants, including literals and named constants (PARAMETER), are now allocated in a memory section that is protected against write access. This means that if a constant is passed as an actual argument to a procedure and the procedure tries to modify the argument, an access violation will result. For example:

call sub (3)
...
subroutine sub (i)
i = i + 1 ! Will cause an access violation

The Fortran language prohibits changing the definition status of an argument associated with a constant or expression. If your application needs to do so, you can specify the /assume:noprotect_constants option. (In the visual development environment, select project property Fortran..Data..Constant Actual Arguments Can Be Changed..Yes.) This will instruct the compiler to create and pass a temporary copy of the constant actual argument. The called procedure can change this copy which will be discarded when the procedure exits.

Das Setzen des oben genannten Flags betrifft allerdings nur benannte Konstanten, Literale (wie die '3' im Beispiel oben) können auch durch das Setzen des Flags nicht verändert werden. Um korrektes Fortran zu gewährleisten, sollte der Flag sowieso nicht gesetzt werden.