Skip to main content
Solved

Can a single source be used for multiple parameterized classes?

  • April 28, 2026
  • 3 replies
  • 23 views

Frank Swarbrick
Forum|alt.badge.img+1

I came upon the following and figured I’d give it a try:  https://docs.rocketsoftware.com/bundle/netexpress_ug_51wrappack1_html/page/opclap_15.htm#s016

As long as the ACTUAL-PARAMS compiler option is specified immediately before the template class (my term), you can build out the full class with the specified name and based on the specified class parameter.  Specifically “$SET ACTUAL-PARAMS(ELinklist Employee)” will build the ELinklist class with Employee being the “parameter class”.  Specifically, the parameter class “Element” in the source for PLinkList will be replaced with actual class Employee.

But what if I want a second one, say ALinklist with class Another as the parameter?  If I put “$SET ACTUAL-PARAMS(ALinklist Another)” below the earlier ACTUAL-PARAMS it will create ALinklist, but ELinklist seems to be gone.

I can post my exact source code if necessary.

Best answer by Chris Glazier

Hi Frank,

I was able to be reproduce this and confirmed with development that currently only a single ACTUAL-PARAMS directive can be specified as the second one will overwrite the first.

We are looking into a possible workaround.

Thanks

3 replies

Chris Glazier
Forum|alt.badge.img+4
  • Moderator
  • Answer
  • April 29, 2026

Hi Frank,

I was able to be reproduce this and confirmed with development that currently only a single ACTUAL-PARAMS directive can be specified as the second one will overwrite the first.

We are looking into a possible workaround.

Thanks


Frank Swarbrick
Forum|alt.badge.img+1
  • Author
  • Participating Frequently
  • April 29, 2026

Thanks.  I have no burning need for it.  Just something I was trying out.


Frank Swarbrick
Forum|alt.badge.img+1
  • Author
  • Participating Frequently
  • April 29, 2026

I will say that the actual-params requirement is a bit “odd”.  The way it works now means you have to compile the parameterized class with the knowledge of what classes will be “used” by the parameterized class.  Seems not very flexible.  If you were to parameterize your current class library it couldn’t possibly work this way, I think.