-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Context
fclap currently treats real(wp) as the float precision.
Problem
This improves consistency, but it also means users cannot do:
real :: x
call args%get("factor", x)when x is not real(wp) (e.g. wp=dp, x=sp) this will fail at compile time ( as its not matching any specific binding).
Discussion
Should fclap remain strict wp-only for generic get, or provide explicit convenience APIs for other kinds (sp, dp, qp) without reintroducing generic ambiguity?
Options
- Keeping get strictly at
real(wp)will require explicit conversion by users and settingwpin fclap; this is IMO not desirable. - Add separately named conversion helpers (e.g.
get_real_sp,get_real_dp, optionalget_real_qp) while keeping generic get aswp-only; that would be a middle ground, but also IMO not very nice. - Provide full multi-kind generic overloads (
sp,dp,qp) across the API. This would allow every CLI argument to have its specific precision up to the wish of any user. Of course, at the cost of having to add interfaces for every real entry point insrc/fclap/fclap_namespace.f90which would make the API much larger, and test and maintenance more painful.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels