Changed many line continuations.

This commit is contained in:
Paul Romano 2011-12-20 14:23:02 -05:00
parent a9fc06987e
commit 154da86236
11 changed files with 118 additions and 120 deletions

View file

@ -203,8 +203,8 @@ contains
! Check to make sure S(a,b) table matched a nuclide
if (mat % sab_nuclide == 0) then
message = "S(a,b) table " // trim(mat % sab_name) // " did not match " &
// "any nuclide on material " // trim(int_to_str(mat % id))
message = "S(a,b) table " // trim(mat % sab_name) // " did not match &
&any nuclide on material " // trim(int_to_str(mat % id))
call fatal_error()
end if
end if
@ -287,7 +287,7 @@ contains
read(UNIT=in, FMT=100) comment, mat, &
(zaids(i), awrs(i), i=1,16), NXS, JXS
100 format(A70,A10/4(I7,F11.0)/4(I7,F11.0)/4(I7,F11.0)/4(I7,F11.0)/&
&,8I9/8I9/8I9/8I9/8I9/8I9)
,8I9/8I9/8I9/8I9/8I9/8I9)
! determine table length
length = NXS(1)

View file

@ -54,64 +54,64 @@ module constants
! GEOMETRY-RELATED CONSTANTS
! Boundary conditions
integer, parameter :: &
& BC_TRANSMIT = 0, & ! Transmission boundary condition (default)
& BC_VACUUM = 1, & ! Vacuum boundary condition
& BC_REFLECT = 2, & ! Reflecting boundary condition
& BC_PERIODIC = 3 ! Periodic boundary condition
integer, parameter :: &
BC_TRANSMIT = 0, & ! Transmission boundary condition (default)
BC_VACUUM = 1, & ! Vacuum boundary condition
BC_REFLECT = 2, & ! Reflecting boundary condition
BC_PERIODIC = 3 ! Periodic boundary condition
! Logical operators for cell definitions
integer, parameter :: &
& OP_LEFT_PAREN = huge(0), & ! Left parentheses
& OP_RIGHT_PAREN = huge(0) - 1, & ! Right parentheses
& OP_UNION = huge(0) - 2, & ! Union operator
& OP_DIFFERENCE = huge(0) - 3 ! Difference operator
integer, parameter :: &
OP_LEFT_PAREN = huge(0), & ! Left parentheses
OP_RIGHT_PAREN = huge(0) - 1, & ! Right parentheses
OP_UNION = huge(0) - 2, & ! Union operator
OP_DIFFERENCE = huge(0) - 3 ! Difference operator
! Cell types
integer, parameter :: &
& CELL_NORMAL = 1, & ! Cell with a specified material
& CELL_FILL = 2, & ! Cell filled by a separate universe
& CELL_LATTICE = 3, & ! Cell filled with a lattice
& CELL_VOID = -1
integer, parameter :: &
CELL_NORMAL = 1, & ! Cell with a specified material
CELL_FILL = 2, & ! Cell filled by a separate universe
CELL_LATTICE = 3, & ! Cell filled with a lattice
CELL_VOID = -1
! Lattice types
integer, parameter :: &
& LATTICE_RECT = 1, &
& LATTICE_HEX = 2
integer, parameter :: &
LATTICE_RECT = 1, &
LATTICE_HEX = 2
! Lattice boundary crossings
integer, parameter :: &
& LATTICE_LEFT = 1, &
& LATTICE_RIGHT = 2, &
& LATTICE_BOTTOM = 3, &
& LATTICE_TOP = 4
integer, parameter :: &
LATTICE_LEFT = 1, &
LATTICE_RIGHT = 2, &
LATTICE_BOTTOM = 3, &
LATTICE_TOP = 4
! Surface types
integer, parameter :: &
& SURF_PX = 1, & ! Plane parallel to x-plane
& SURF_PY = 2, & ! Plane parallel to y-plane
& SURF_PZ = 3, & ! Plane parallel to z-plane
& SURF_PLANE = 4, & ! Arbitrary plane
& SURF_CYL_X = 5, & ! Cylinder along x-axis
& SURF_CYL_Y = 6, & ! Cylinder along y-axis
& SURF_CYL_Z = 7, & ! Cylinder along z-axis
& SURF_SPHERE = 8, & ! Sphere
& SURF_BOX_X = 9, & ! Box extending infinitely in x-direction
& SURF_BOX_Y = 10, & ! Box extending infinitely in y-direction
& SURF_BOX_Z = 11, & ! Box extending infinitely in z-direction
& SURF_BOX = 12, & ! Rectangular prism
& SURF_GQ = 13 ! General quadratic surface
integer, parameter :: &
SURF_PX = 1, & ! Plane parallel to x-plane
SURF_PY = 2, & ! Plane parallel to y-plane
SURF_PZ = 3, & ! Plane parallel to z-plane
SURF_PLANE = 4, & ! Arbitrary plane
SURF_CYL_X = 5, & ! Cylinder along x-axis
SURF_CYL_Y = 6, & ! Cylinder along y-axis
SURF_CYL_Z = 7, & ! Cylinder along z-axis
SURF_SPHERE = 8, & ! Sphere
SURF_BOX_X = 9, & ! Box extending infinitely in x-direction
SURF_BOX_Y = 10, & ! Box extending infinitely in y-direction
SURF_BOX_Z = 11, & ! Box extending infinitely in z-direction
SURF_BOX = 12, & ! Rectangular prism
SURF_GQ = 13 ! General quadratic surface
! Surface senses
integer, parameter :: &
& SENSE_POSITIVE = 1, &
& SENSE_NEGATIVE = -1
integer, parameter :: &
SENSE_POSITIVE = 1, &
SENSE_NEGATIVE = -1
! ============================================================================
! CROSS SECTION RELATED CONSTANTS
! Interpolation flag
integer, parameter :: &
integer, parameter :: &
HISTOGRAM = 1, & ! y is constant in x
LINEAR_LINEAR = 2, & ! y is linear in x
LINEAR_LOG = 3, & ! y is linear in ln(x)
@ -126,19 +126,19 @@ module constants
! Angular distribution type
integer, parameter :: &
& ANGLE_ISOTROPIC = 1, & ! Isotropic angular distribution
& ANGLE_32_EQUI = 2, & ! 32 equiprobable bins
& ANGLE_TABULAR = 3 ! Tabular angular distribution
ANGLE_ISOTROPIC = 1, & ! Isotropic angular distribution
ANGLE_32_EQUI = 2, & ! 32 equiprobable bins
ANGLE_TABULAR = 3 ! Tabular angular distribution
! Secondary energy mode for S(a,b) inelastic scattering
integer, parameter :: &
& SAB_SECONDARY_EQUAL = 0, & ! Equally-likely outgoing energy bins
& SAB_SECONDARY_SKEWED = 1 ! Skewed outgoing energy bins
SAB_SECONDARY_EQUAL = 0, & ! Equally-likely outgoing energy bins
SAB_SECONDARY_SKEWED = 1 ! Skewed outgoing energy bins
! Elastic mode for S(a,b) elastic scattering
integer, parameter :: &
& SAB_ELASTIC_DISCRETE = 3, & ! Sample from discrete cosines
& SAB_ELASTIC_EXACT = 4 ! Exact treatment for coherent elastic
SAB_ELASTIC_DISCRETE = 3, & ! Sample from discrete cosines
SAB_ELASTIC_EXACT = 4 ! Exact treatment for coherent elastic
! Reaction types
integer, parameter :: &

View file

@ -429,8 +429,8 @@ contains
! Couldn't find next cell anywhere!
if ((.not. found) .and. (.not. plotting)) then
message = "After particle crossed surface " // trim(int_to_str( &
surfaces(abs(p%surface)) % id)) // " it could not be located in " &
// "any cell and it did not leak."
surfaces(abs(p%surface)) % id)) // " it could not be located in &
&any cell and it did not leak."
call fatal_error()
end if
@ -1055,7 +1055,7 @@ contains
y1 = surf % coeffs(5)
z1 = surf % coeffs(6)
if (x >= x0 .and. x < x1 .and. y >= y0 .and. y < y1 .and. &
& z >= z0 .and. z < z1) then
z >= z0 .and. z < z1) then
s = SENSE_NEGATIVE
else
s = SENSE_POSITIVE
@ -1074,7 +1074,7 @@ contains
I = surf % coeffs(9)
J = surf % coeffs(10)
func = A*x*x + B*y*y + C*z*z + D*x*y + E*y*z + F*x*z + G*x &
& + H*y + I*z + J
+ H*y + I*z + J
end select

View file

@ -45,8 +45,8 @@ module geometry_header
integer :: type ! Type of surface
real(8), allocatable :: coeffs(:) ! Definition of surface
integer, allocatable :: &
& neighbor_pos(:), & ! List of cells on positive side
& neighbor_neg(:) ! List of cells on negative side
neighbor_pos(:), & ! List of cells on positive side
neighbor_neg(:) ! List of cells on negative side
integer :: bc ! Boundary condition
end type Surface

View file

@ -297,7 +297,7 @@ contains
c % surfaces(j) = sign(i_array, id)
else
message = "Could not find surface " // trim(int_to_str(abs(id))) // &
& " specified on cell " // trim(int_to_str(c % id))
" specified on cell " // trim(int_to_str(c % id))
call fatal_error()
end if
end if
@ -376,7 +376,7 @@ contains
t % cell_bins(j) % scalar = dict_get_key(cell_dict, id)
else
message = "Could not find cell " // trim(int_to_str(id)) // &
& " specified on tally " // trim(int_to_str(t % id))
" specified on tally " // trim(int_to_str(t % id))
call fatal_error()
end if
end do
@ -392,7 +392,7 @@ contains
t % surface_bins(j) % scalar = dict_get_key(surface_dict, id)
else
message = "Could not find surface " // trim(int_to_str(id)) // &
& " specified on tally " // trim(int_to_str(t % id))
" specified on tally " // trim(int_to_str(t % id))
call fatal_error()
end if
end do
@ -408,7 +408,7 @@ contains
t % universe_bins(j) % scalar = dict_get_key(universe_dict, id)
else
message = "Could not find universe " // trim(int_to_str(id)) // &
& " specified on tally " // trim(int_to_str(t % id))
" specified on tally " // trim(int_to_str(t % id))
call fatal_error()
end if
end do
@ -424,7 +424,7 @@ contains
t % material_bins(j) % scalar = dict_get_key(material_dict, id)
else
message = "Could not find material " // trim(int_to_str(id)) // &
& " specified on tally " // trim(int_to_str(t % id))
" specified on tally " // trim(int_to_str(t % id))
call fatal_error()
end if
end do
@ -440,7 +440,7 @@ contains
t % cellborn_bins(j) % scalar = dict_get_key(cell_dict, id)
else
message = "Could not find material " // trim(int_to_str(id)) // &
& " specified on tally " // trim(int_to_str(t % id))
" specified on tally " // trim(int_to_str(t % id))
call fatal_error()
end if
end do
@ -455,7 +455,7 @@ contains
t % mesh = dict_get_key(mesh_dict, id)
else
message = "Could not find mesh " // trim(int_to_str(id)) // &
& " specified on tally " // trim(int_to_str(t % id))
" specified on tally " // trim(int_to_str(t % id))
call fatal_error()
end if
end if
@ -545,9 +545,9 @@ contains
! Check to make sure either all atom percents or all weight percents are
! given
if (.not. (all(mat%atom_percent > ZERO) .or. &
& all(mat%atom_percent < ZERO))) then
all(mat%atom_percent < ZERO))) then
message = "Cannot mix atom and weight percents in material " // &
& int_to_str(mat % id)
int_to_str(mat % id)
call fatal_error()
end if
@ -605,7 +605,7 @@ contains
end do
sum_percent = ONE / sum_percent
mat % density = -mat % density * N_AVOGADRO &
& / MASS_NEUTRON * sum_percent
/ MASS_NEUTRON * sum_percent
end if
! Calculate nuclide atom densities and deallocate atom_percent array

View file

@ -14,8 +14,8 @@ module input_xml
implicit none
type(DictionaryII), pointer :: & ! used to count how many cells each
& cells_in_univ_dict => null() ! universe contains
type(DictionaryII), pointer :: & ! used to count how many cells each
cells_in_univ_dict => null() ! universe contains
contains
@ -78,9 +78,8 @@ contains
! variable
call get_environment_variable("CROSS_SECTIONS", env_variable)
if (len_trim(env_variable) == 0) then
message = "No cross_sections.xml file was specified in " // &
"settings.xml or in the CROSS_SECTIONS environment " // &
"variable."
message = "No cross_sections.xml file was specified in settings.xml &
&or in the CROSS_SECTIONS environment variable."
call fatal_error()
else
path_cross_sections = trim(env_variable)
@ -146,8 +145,8 @@ contains
if (associated(entropy_box_)) then
! Check to make sure enough values were supplied
if (size(entropy_box_) /= 6) then
message = "Need to supply lower-left and upper-right coordinates " &
// "for Shannon entropy box."
message = "Need to supply lower-left and upper-right coordinates &
&for Shannon entropy box."
call fatal_error()
end if
@ -157,8 +156,8 @@ contains
! Check on values provided
if (.not. all(entropy_upper_right > entropy_lower_left)) then
message = "Upper-right coordinate must be greater than lower-left " &
// "coordinate for Shannon entropy box."
message = "Upper-right coordinate must be greater than lower-left &
&coordinate for Shannon entropy box."
call fatal_error()
end if
@ -336,7 +335,6 @@ contains
if (n < coeffs_reqd) then
message = "Not enough coefficients specified for surface: " // &
trim(int_to_str(s % id))
print *, n, coeffs_reqd
call fatal_error()
elseif (n > coeffs_reqd) then
message = "Too many coefficients specified for surface: " // &
@ -562,8 +560,8 @@ contains
trim(name)
call fatal_error()
elseif (nuc % ao /= ZERO .and. nuc % wo /= ZERO) then
message = "Cannot specify both atom and weight percents for a " &
// "nuclide: " // trim(name)
message = "Cannot specify both atom and weight percents for a &
&nuclide: " // trim(name)
call fatal_error()
end if
@ -693,16 +691,16 @@ contains
! Read mesh origin location
if (m % n_dimension /= size(mesh_(i) % origin)) then
message = "Number of entries on <origin> must be the same as " // &
"the number of entries on <dimension>."
message = "Number of entries on <origin> must be the same as the &
&number of entries on <dimension>."
call fatal_error()
end if
m % origin = mesh_(i) % origin
! Read mesh widths
if (size(mesh_(i) % width) /= size(mesh_(i) % origin)) then
message = "Number of entries on <width> must be the same as " // &
"the number of entries on <origin>."
message = "Number of entries on <width> must be the same as the &
&number of entries on <origin>."
call fatal_error()
end if
m % width = mesh_(i) % width
@ -845,8 +843,8 @@ contains
case ('total')
t % macro_bins(j) % scalar = MACRO_TOTAL
if (t % n_bins(T_ENERGYOUT) > 0) then
message = "Cannot tally total reaction rate with an " &
// "outgoing energy filter."
message = "Cannot tally total reaction rate with an &
&outgoing energy filter."
call fatal_error()
end if
case ('scatter')
@ -870,15 +868,15 @@ contains
case ('absorption')
t % macro_bins(j) % scalar = MACRO_ABSORPTION
if (t % n_bins(T_ENERGYOUT) > 0) then
message = "Cannot tally absorption rate with an outgoing " &
// "energy filter."
message = "Cannot tally absorption rate with an outgoing &
&energy filter."
call fatal_error()
end if
case ('fission')
t % macro_bins(j) % scalar = MACRO_FISSION
if (t % n_bins(T_ENERGYOUT) > 0) then
message = "Cannot tally fission rate with an outgoing " &
// "energy filter."
message = "Cannot tally fission rate with an outgoing &
&energy filter."
call fatal_error()
end if
case ('nu-fission')
@ -890,9 +888,9 @@ contains
! Check to make sure that current is the only desired response
! for this tally
if (n_words > 1) then
message = "Cannot tally other macro reactions in the same " &
// "tally as surface currents. Separate other macro " &
// "reactions into a distinct tally."
message = "Cannot tally other macro reactions in the same &
&tally as surface currents. Separate other macro &
&reactions into a distinct tally."
call fatal_error()
end if

View file

@ -126,7 +126,7 @@ contains
#ifdef MPI
! Collect number bank sites onto master process
call MPI_REDUCE(n_bank, total_bank, 1, MPI_INTEGER8, MPI_SUM, 0, &
& MPI_COMM_WORLD, mpi_err)
MPI_COMM_WORLD, mpi_err)
#else
total_bank = n_bank
#endif

View file

@ -82,7 +82,7 @@ contains
bank_blocks = (/ 1, 3, 3, 1 /)
bank_types = (/ MPI_INTEGER8, MPI_REAL8, MPI_REAL8, MPI_REAL8 /)
call MPI_TYPE_CREATE_STRUCT(4, bank_blocks, bank_disp, &
& bank_types, MPI_BANK, mpi_err)
bank_types, MPI_BANK, mpi_err)
call MPI_TYPE_COMMIT(MPI_BANK, mpi_err)
#else
@ -115,9 +115,9 @@ contains
integer(8) :: sites_needed ! # of sites to be sampled
real(8) :: p_sample ! probability of sampling a site
type(Bank), allocatable :: &
& temp_sites(:), & ! local array of extra sites on each node
& left_bank(:), & ! bank sites to send/recv to or from left node
& right_bank(:) ! bank sites to send/recv to or fram right node
temp_sites(:), & ! local array of extra sites on each node
left_bank(:), & ! bank sites to send/recv to or from left node
right_bank(:) ! bank sites to send/recv to or fram right node
#ifdef MPI
integer :: status(MPI_STATUS_SIZE) ! message status
@ -133,11 +133,11 @@ contains
! Determine starting index for fission bank and total sites in fission bank
start = 0_8
call MPI_EXSCAN(n_bank, start, 1, MPI_INTEGER8, MPI_SUM, &
& MPI_COMM_WORLD, mpi_err)
MPI_COMM_WORLD, mpi_err)
finish = start + n_bank
total = finish
call MPI_BCAST(total, 1, MPI_INTEGER8, n_procs - 1, &
& MPI_COMM_WORLD, mpi_err)
MPI_COMM_WORLD, mpi_err)
#else
start = 0_8
@ -200,11 +200,11 @@ contains
#ifdef MPI
start = 0_8
call MPI_EXSCAN(index_local, start, 1, MPI_INTEGER8, MPI_SUM, &
& MPI_COMM_WORLD, mpi_err)
MPI_COMM_WORLD, mpi_err)
finish = start + index_local
total = finish
call MPI_BCAST(total, 1, MPI_INTEGER8, n_procs - 1, &
& MPI_COMM_WORLD, mpi_err)
MPI_COMM_WORLD, mpi_err)
#else
start = 0_8
finish = index_local
@ -259,18 +259,18 @@ contains
if (send_to_right > 0) then
i = index_local - send_to_right + 1
call MPI_ISEND(temp_sites(i), send_to_right, MPI_BANK, rank+1, 0, &
& MPI_COMM_WORLD, request, mpi_err)
MPI_COMM_WORLD, request, mpi_err)
else if (send_to_right < 0) then
call MPI_IRECV(right_bank, -send_to_right, MPI_BANK, rank+1, 1, &
& MPI_COMM_WORLD, request_right, mpi_err)
MPI_COMM_WORLD, request_right, mpi_err)
end if
if (send_to_left < 0) then
call MPI_IRECV(left_bank, -send_to_left, MPI_BANK, rank-1, 0, &
& MPI_COMM_WORLD, request_left, mpi_err)
MPI_COMM_WORLD, request_left, mpi_err)
else if (send_to_left > 0) then
call MPI_ISEND(temp_sites(1), send_to_left, MPI_BANK, rank-1, 1, &
& MPI_COMM_WORLD, request, mpi_err)
MPI_COMM_WORLD, request, mpi_err)
end if
#endif

View file

@ -524,7 +524,7 @@ contains
! Write total atom density in atom/b-cm
write(unit_,*) ' Atom Density = ' // trim(real_to_str(mat % density)) &
& // ' atom/b-cm'
// ' atom/b-cm'
! Write atom density for each nuclide in material
write(unit_,*) ' Nuclides:'
@ -532,7 +532,7 @@ contains
nuc => nuclides(mat % nuclide(i))
density = mat % atom_density(i)
string = ' ' // trim(nuc % name) // ' = ' // &
& trim(real_to_str(density)) // ' atom/b-cm'
trim(real_to_str(density)) // ' atom/b-cm'
write(unit_,*) trim(string)
end do

View file

@ -316,7 +316,7 @@ contains
! add to cumulative probability
prob = prob + ((ONE-f)*rxn%sigma(IE-rxn%IE+1) &
& + f*(rxn%sigma(IE-rxn%IE+2)))
+ f*(rxn%sigma(IE-rxn%IE+2)))
end do
else
! For nuclides with only total fission reaction, get a pointer to
@ -341,7 +341,7 @@ contains
! add to cumulative probability
if (nuc % has_partial_fission) then
prob = prob + ((ONE-f)*rxn%sigma(IE-rxn%IE+1) &
& + f*(rxn%sigma(IE-rxn%IE+2)))
+ f*(rxn%sigma(IE-rxn%IE+2)))
else
prob = prob + micro_xs(index_nuclide) % fission
end if
@ -437,7 +437,7 @@ contains
! add to cumulative probability
prob = prob + ((ONE-f)*rxn%sigma(IE-rxn%IE+1) &
& + f*(rxn%sigma(IE-rxn%IE+2)))
+ f*(rxn%sigma(IE-rxn%IE+2)))
end do
! Perform collision physics for inelastics scattering
@ -1007,7 +1007,7 @@ contains
! determine outgoing energy in lab
E = E_cm + (E_in + TWO * mu * (A+ONE) * sqrt(E_in * E_cm)) &
& / ((A+ONE)*(A+ONE))
/ ((A+ONE)*(A+ONE))
! determine outgoing angle in lab
mu = mu * sqrt(E_cm/E) + ONE/(A+ONE) * sqrt(E_in/E)
@ -1083,7 +1083,7 @@ contains
else
i = binary_search(rxn % adist % energy, n, E)
r = (E - rxn % adist % energy(i)) / &
& (rxn % adist % energy(i+1) - rxn % adist % energy(i))
(rxn % adist % energy(i+1) - rxn % adist % energy(i))
end if
! Sample between the ith and (i+1)th bin
@ -1303,7 +1303,7 @@ contains
lc = 2 + 2*NR
i = binary_search(edist % data(lc+1), NE, E_in)
r = (E_in - edist%data(lc+i)) / &
& (edist%data(lc+i+1) - edist%data(lc+i))
(edist%data(lc+i+1) - edist%data(lc+i))
! Sample outgoing energy bin
r1 = prn()
@ -1379,7 +1379,7 @@ contains
else
i = binary_search(edist % data(lc+1), NE, E_in)
r = (E_in - edist%data(lc+i)) / &
& (edist%data(lc+i+1) - edist%data(lc+i))
(edist%data(lc+i+1) - edist%data(lc+i))
end if
! Sample between the ith and (i+1)th bin
@ -1452,7 +1452,7 @@ contains
E_out = E_l_k + (r1 - c_k)/p_l_k
else
E_out = E_l_k + (sqrt(p_l_k*p_l_k + 2*frac*(r1 - c_k)) - &
& p_l_k)/frac
p_l_k)/frac
end if
else
message = "Unknown interpolation type: " // trim(int_to_str(INTT))
@ -1605,7 +1605,7 @@ contains
else
i = binary_search(edist % data(lc+1), NE, E_in)
r = (E_in - edist%data(lc+i)) / &
& (edist%data(lc+i+1) - edist%data(lc+i))
(edist%data(lc+i+1) - edist%data(lc+i))
end if
! Sample between the ith and (i+1)th bin
@ -1684,7 +1684,7 @@ contains
E_out = E_l_k + (r1 - c_k)/p_l_k
else
E_out = E_l_k + (sqrt(p_l_k*p_l_k + 2*frac*(r1 - c_k)) - &
& p_l_k)/frac
p_l_k)/frac
end if
! Determine Kalbach-Mann parameters
@ -1748,7 +1748,7 @@ contains
else
i = binary_search(edist % data(lc+1), NE, E_in)
r = (E_in - edist%data(lc+i)) / &
& (edist%data(lc+i+1) - edist%data(lc+i))
(edist%data(lc+i+1) - edist%data(lc+i))
end if
! Sample between the ith and (i+1)th bin
@ -1823,7 +1823,7 @@ contains
E_out = E_l_k + (r1 - c_k)/p_l_k
else
E_out = E_l_k + (sqrt(p_l_k*p_l_k + 2*frac*(r1 - c_k)) - &
& p_l_k)/frac
p_l_k)/frac
end if
else
message = "Unknown interpolation type: " // trim(int_to_str(INTT))

View file

@ -348,7 +348,7 @@ contains
! Determine number of digits to right of decimal point
index_decimal = index(string, '.')
index_exponent = max(index(string, 'd'), index(string, 'D'), &
& index(string, 'e'), index(string, 'E'))
index(string, 'e'), index(string, 'E'))
if (index_decimal > 0) then
if (index_exponent > 0) then
d = index_exponent - index_decimal - 1