Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add stdlib_experimental_kinds.f90 and use it #63

Merged
merged 6 commits into from
Jan 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set(SRC
stdlib_experimental_io.f90
stdlib_experimental_error.f90
stdlib_experimental_optval.f90
stdlib_experimental_kinds.f90
)

add_library(fortran_stdlib ${SRC})
Expand Down
7 changes: 6 additions & 1 deletion src/Makefile.manual
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ SRC = stdlib_experimental_ascii.f90 \
stdlib_experimental_error.f90 \
stdlib_experimental_io.f90 \
stdlib_experimental_optval.f90 \
stdlib_experimental_kinds.f90 \
f18estop.f90

LIB = libstdlib.a
Expand All @@ -28,4 +29,8 @@ clean:

# Fortran module dependencies
f18estop.o: stdlib_experimental_error.o
stdlib_experimental_io.o: stdlib_experimental_error.o stdlib_experimental_optval.o
stdlib_experimental_io.o: \
stdlib_experimental_error.o \
stdlib_experimental_optval.o \
stdlib_experimental_kinds.o
stdlib_experimental_optval.o: stdlib_experimental_kinds.o
2 changes: 1 addition & 1 deletion src/stdlib_experimental_io.f90
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module stdlib_experimental_io
use iso_fortran_env, only: sp=>real32, dp=>real64, qp=>real128
use stdlib_experimental_kinds, only: sp, dp, qp
use stdlib_experimental_error, only: error_stop
use stdlib_experimental_optval, only: optval
implicit none
Expand Down
10 changes: 10 additions & 0 deletions src/stdlib_experimental_kinds.f90
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module stdlib_experimental_kinds
use iso_fortran_env, only: sp=>real32, dp=>real64, qp=>real128
use iso_fortran_env, only: int8, int16, int32, int64
! If we decide later to use iso_fortran_env instead of iso_fortran_env:
!use iso_c_binding, only: sp=>c_float, dp=>c_double, qp=>c_float128
!use iso_c_binding, only: int8=>c_int8_t, int16=>c_int16_t, int32=>c_int32_t, int64=>c_int64_t
implicit none
private
public sp, dp, qp, int8, int16, int32, int64
end module
2 changes: 1 addition & 1 deletion src/stdlib_experimental_optval.f90
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module stdlib_experimental_optval
!!
!! It is an error to call `optval` with a single actual argument.
!!
use iso_fortran_env, only: sp => real32, dp => real64, qp => real128, int8, int16, int32, int64
use stdlib_experimental_kinds, only: sp, dp, qp, int8, int16, int32, int64
implicit none


Expand Down
2 changes: 1 addition & 1 deletion src/tests/io/test_loadtxt.f90
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
program test_loadtxt
use iso_fortran_env, only: sp=>real32, dp=>real64
use stdlib_experimental_kinds, only: sp, dp
use stdlib_experimental_io, only: loadtxt
use stdlib_experimental_error, only: error_stop
implicit none
Expand Down
2 changes: 1 addition & 1 deletion src/tests/io/test_loadtxt_qp.f90
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
program test_loadtxt_qp
use iso_fortran_env, only: qp=>real128
use stdlib_experimental_kinds, only: qp
use stdlib_experimental_io, only: loadtxt
implicit none

Expand Down
2 changes: 1 addition & 1 deletion src/tests/io/test_savetxt.f90
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
program test_savetxt
use iso_fortran_env, only: sp=>real32, dp=>real64
use stdlib_experimental_kinds, only: sp, dp
use stdlib_experimental_io, only: loadtxt, savetxt
use stdlib_experimental_error, only: assert
implicit none
Expand Down
2 changes: 1 addition & 1 deletion src/tests/io/test_savetxt_qp.f90
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
program test_savetxt_qp
use iso_fortran_env, only: qp=>real128
use stdlib_experimental_kinds, only: qp
use stdlib_experimental_io, only: loadtxt, savetxt
use stdlib_experimental_error, only: assert
implicit none
Expand Down