Unfamiliar .D0 number syntax
Mostrar comentarios más antiguos
I've inherited some Matlab code that was previously adapted from Fortran, and the Matlab code has a syntax I'm not familiar with. Numbers end with .D0, so I see a lot of lines like:
a = b*5.D0;
which produces the same result as
a = b*5;
I haven't found any documentation for this syntax, but it's easy to deduce what it's doing:
>> 12345.D0
ans =
12345
>> 12345.D2
ans =
1234500
>> 12345.D-3
ans =
12.3450
My questions are:
- What is this syntax called?
- Is there any particular reason to use it?
- Can I safely delete every instance of .D0 from this code I've inherited?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Fortran with MATLAB en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!