I take it we'll need generated code to cover all of the type-kind-ranks we'll run into. Any shortcuts?
I was not thinking very clearly when I submitted this. I think this greatly lowers the priority in my mind, unless it is very easy to adapt from your existing code.
The compiler would do all the overloading. That's probably better than doing the overloading ourselves. (Wish I could claim I was thinking along these lines when I opened the request.)
Status: open
Group: Current Release Upgrade (v2)
Created: Sat Apr 26, 2014 03:42 PM UTC by Tom Clune
Last Updated: Sat Apr 26, 2014 03:42 PM UTC
Owner: Tom Clune
Two forms:
assertAssociated(ptr) raises exception if associated(ptr) is false
assertAssociated(a,b) rasises exception if associated(a,b) is false
Also two forms for the opposite "unassociated" case.
Provided @assertAssociated(ptr) and @assertAssociatedWith(ptr,tgt). These map to call assertTrue(associated(...)) to let the compiler do the type checking. We did not implement assertAssociated* subroutines. We also provide @assertUnAssociated (and With) that map to assertFalse.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I take it we'll need generated code to cover all of the type-kind-ranks we'll run into. Any shortcuts?
On Apr 26, 2014, at 4:26 PM, "Michael L. Rilee" mlrilee@users.sf.net wrote:
I was not thinking very clearly when I submitted this. I think this greatly lowers the priority in my mind, unless it is very easy to adapt from your existing code.
Hmm, thinking. If we expanded the macro
@assertAssociated(ptr[,…]) => call assertTrue(associated(ptr)[, …])
The compiler would do all the overloading. That's probably better than doing the overloading ourselves. (Wish I could claim I was thinking along these lines when I opened the request.)
Thomas Clune, Ph. D. Thomas.L.Clune@nasa.gov
CISTO Code 606.0
NASA GSFC 301-286-4635
MS 610.8 B33-C128
Greenbelt, MD 20771
Related
Feature Requests:
#18Provided @assertAssociated(ptr) and @assertAssociatedWith(ptr,tgt). These map to call assertTrue(associated(...)) to let the compiler do the type checking. We did not implement assertAssociated* subroutines. We also provide @assertUnAssociated (and With) that map to assertFalse.