- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Hi.
I'm trying to convert my old fortran 77 v3.31 to the
digital visual fortran explicyt
Everything is seem to be fine but i got this problem
with the new created files.
i have this code:
CHARACTER* 10 DESCR
REAL*4 R1,Z1,X1,X2,X3
OPEN(20,file='test.DAT',ACCESS='DIRECT',RECL=34)
DO 100 I = 1, 100
WRITE(20,REC=I)'ABCDEFGHIJ',1.0,2.0,3.0,4.0,5.0
100 CONTINUE
STOP
END
When i hexdum my old file a i see exactly 34 bytes per record. But in the new file i see 128 bytes. The additional space are filled with spaces.
It's seem recl is not working!. I had tried the explicit recordtype='FIXED' but the file i got is exactly the same.
Thank for your time
I'm trying to convert my old fortran 77 v3.31 to the
digital visual fortran explicyt
Everything is seem to be fine but i got this problem
with the new created files.
i have this code:
CHARACTER* 10 DESCR
REAL*4 R1,Z1,X1,X2,X3
OPEN(20,file='test.DAT',ACCESS='DIRECT',RECL=34)
DO 100 I = 1, 100
WRITE(20,REC=I)'ABCDEFGHIJ',1.0,2.0,3.0,4.0,5.0
100 CONTINUE
STOP
END
When i hexdum my old file a i see exactly 34 bytes per record. But in the new file i see 128 bytes. The additional space are filled with spaces.
It's seem recl is not working!. I had tried the explicit recordtype='FIXED' but the file i got is exactly the same.
Thank for your time
- Balises:
- Intel® Fortran Compiler
Lien copié
6 Réponses
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
In Digital/Compaq Fortran, the units for RECL of unformatted files is four bytes. If you're using a reasonably recent version of Visual Fortran (and if yours says "Digital", you're not), there's an option /assume:byterecl to change the unit to bytes.
Unfortunately, 34 isn't divisible by 4 so you can't take the easy approach of just dividing the RECL by 4.
Steve
Unfortunately, 34 isn't divisible by 4 so you can't take the easy approach of just dividing the RECL by 4.
Steve
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
/assume:byterecl was available in DVF5 -- Project/Settings/Fortran/Fortran Data/Use bytes...
Jugoslav
Jugoslav
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Was it really? Good - I thought it came after that.
Steve
Steve
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
It might have been related to Microsoft Powerstation
compatibility, where the record lengths were measured in
bytes. I seem to remember that if you opened an old
Powerstation project in DVF, it would use bytes. If
you started a new project, it would default to words.
At the time, I was selling a VB graphics postprocessor to a Fortran model, where the intermediate file was an unformatted direct access file, and this was one of the
things that would often cause trouble.
compatibility, where the record lengths were measured in
bytes. I seem to remember that if you opened an old
Powerstation project in DVF, it would use bytes. If
you started a new project, it would default to words.
At the time, I was selling a VB graphics postprocessor to a Fortran model, where the intermediate file was an unformatted direct access file, and this was one of the
things that would often cause trouble.
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Thank. Now everything is working fine.
I have a lot of small programs that need this setting, and i don't want to forget this setting in one of them because it will destroy my data. Can i preset the compiler to keep /assume:byterecl in all workspace??
Thank again
I have a lot of small programs that need this setting, and i don't want to forget this setting in one of them because it will destroy my data. Can i preset the compiler to keep /assume:byterecl in all workspace??
Thank again
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Actually, /assume:byterecl predates DVF and any concern about PowerStation. We added it for the benefit of our customers porting from other vendors UNIX systems to our compilers.
There is a way to save settings. Once you have a project set up the way you want it, click on the "Save Fortran Environment" button (a green tree). You can then give the saved settings a name. The next time you create a project of the same type (eg. console), it will ask you if you want to apply the saved settings.
Steve
There is a way to save settings. Once you have a project set up the way you want it, click on the "Save Fortran Environment" button (a green tree). You can then give the saved settings a name. The next time you create a project of the same type (eg. console), it will ask you if you want to apply the saved settings.
Steve
Répondre
Options du sujet
- S'abonner au fil RSS
- Marquer le sujet comme nouveau
- Marquer le sujet comme lu
- Placer ce Sujet en tête de liste pour l'utilisateur actuel
- Marquer
- S'abonner
- Page imprimable