Anonymous Guest
|
Posted: Wed Nov 03, 2004 3:04 pm Post subject: length in bytes for a type |
|
|
Hello,
I have created a type
Code: | TYPE val_table
REAL:,densite,proba
END TYPE |
and I want to stock in the variable longueur_fiche the length (in bytes) of this type's elements.
Then, I want to use this variable to read a binary file :
Code: | OPEN(11,FILE='loi.bin',STATUS='OLD', RECL=longueur_fiche, ACCESS='direct',ACTION='READ') |
How can I do ?
Is there a function to do this action ?
In the same program, I want to compare two logicals elements
Code: | LOGICAL::presence
INQUIRE(FILE='loi.bin',EXIST=presence)
IF (presence==.FALSE.) STOP |
Have you an idea ?
Thank you for your answer
Le Murphy |
|