Quantcast
Channel: Visual COBOL - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4356

Type Casting

$
0
0

Dear community,

I need your help in order to cast a type 'dynamically', using the GetType() method to set the target Type instead of hardcoding the Type.

Below you can find a simple sample code.

procedure division using inObj as object.
     set (inObj as type Class2)::c1x1 to "test".                      <- OK but hardcoded
     set (inObj as type inObj::GetType)::c1x1 to "test".        <- Error COBCH0813

When I try to compile (VC v2.2u2) the above code, I get the error "COBCH0813 : Feature not yet supported when compiling for .NET".

Does anyone have any suggestion or alternative solution?


Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>