BlueM.Sim compilation: Difference between revisions
mNo edit summary |
|||
Line 8: | Line 8: | ||
Aus den Release notes: | Aus den Release notes: | ||
<blockquote> | <blockquote> | ||
Constants Are Now Read-Only | <u>Constants Are Now Read-Only</u><br/> | ||
Constants, including literals and named constants (<code>PARAMETER</code>), 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: | Constants, including literals and named constants (<code>PARAMETER</code>), 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: | ||
Revision as of 06:50, 12 July 2006
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 violationThe 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.