Home/Support/Support Forum/Rompager Syntax, how to prevent code duplication in stub files
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Rompager Syntax, how to prevent code duplication in stub files

0 votes
Assuming you have the following code inserted into several web pages or several locations in your project:
Code:
<!-- RpDisplayText RpGetType=Function RpGetPtr=getProductName --> The Product Name <!-- RpEnd -->

How to prevent PBuilder from building multiple instances of this same function in the _v.c stubbed out implementation files?

e.g.
Code:
extern char *getProductName(void); char *getProductName(void) { char * theResult; return theResult; }
asked May 8, 2012 in NET+OS by gpotter New to the Community (2 points)

Please log in or register to answer this question.

2 Answers

0 votes
Use RpIdentifier in one file to define the repeated construct:
Code:
<!-- RpItemGroup RpIdentifier=LogoHeader --> HTML/Rompager code here <!-- RpLastItemInGroup -->

Then call it up in the other files:
Code:
<!-- RpUseIdentifier RpIdentifier=LogoHeader RpItemType=ItemGroup --> Page Header here <!-- RpEnd -->
answered May 8, 2012 by steved2 Seasoned Professional (151 points)
0 votes
Thank you Steve that did the trick.
answered May 22, 2012 by gpotter New to the Community (2 points)
...