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

Data type determined at run time #161

Open
currodri opened this issue Dec 11, 2021 · 0 comments
Open

Data type determined at run time #161

currodri opened this issue Dec 11, 2021 · 0 comments

Comments

@currodri
Copy link

currodri commented Dec 11, 2021

Hi James,

I was just wondering if there's any way of having a variable with a data type which is determined at runtime, like for a parametrised derived data type:

TYPE :: vector(kind,n)
INTEGER, KIND :: kind = KIND(0.) ! Defaults to single precision
INTEGER, n = 3                              ! Defaults to three elements
REAL(kind),DIMENSION(n) :: v     ! Parameterized vector
END TYPE vector

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant