codata_constant_type - derived type
Codata library (libcodata, -lcodata)
|
Fortran |
type(codata_constant_type) :: c |
|||
|
C |
struct codata_constant_type c |
Defines a constant with the name, the value, the uncertainty and the unit.
type :: codata_constant_type
character(len=64) :: name
real(dp) :: value
real(dp) :: uncertainty
character(len=32) :: unit
contains
procedure :: print
procedure :: to_real_sp
procedure :: to_real_dp
generic :: to_real => to_real_sp, to_real_dp
end type codata_constant_type
struct codata_constant_type{
char name[65];
double value;
double uncertainty;
char unit[33];
};
Fortran:
use codata
type(codata_constant_type), pointer :: c
c = SPEED_OF_LIGHT_IN_VACUUM
C:
include
"codata.h"
struct codata_constant_type c;
c = SPEED_OF_LIGHT_IN_VACUUM;
codata(3), codata_cli(1), codata_version(3), codata_constant_type(3)