# Rompager Syntax, how to prevent code duplication in stub files

**URL:** <https://forums.digi.com/t/rompager-syntax-how-to-prevent-code-duplication-in-stub-files/5439>\
**Category:** NET+OS\
**Created:** [May 8, 2012, 1:26am UTC](https://forums.digi.com/t/rompager-syntax-how-to-prevent-code-duplication-in-stub-files/5439 "2012-05-08T01:26:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gpotter](https://avatars.discourse-cdn.com/v4/letter/g/59ef9b/32.png) [@gpotter](https://forums.digi.com/u/gpotter)\
**Post date:** [May 8, 2012, 1:26am UTC](https://forums.digi.com/t/rompager-syntax-how-to-prevent-code-duplication-in-stub-files/5439/1 "2012-05-08T01:26:54Z")

</div>

Assuming you have the following code inserted into several web pages or several locations in your project:

```auto
 The Product Name 
  

```

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

e.g.

```auto
extern char *getProductName(void);
char *getProductName(void) {
	char * theResult;

	return theResult;
}

```

---

<div class="post-metadata">

**Author:** ![steved2](https://avatars.discourse-cdn.com/v4/letter/s/a698b9/32.png) [@steved2](https://forums.digi.com/u/steved2)\
**Post date:** [May 8, 2012, 8:03am UTC](https://forums.digi.com/t/rompager-syntax-how-to-prevent-code-duplication-in-stub-files/5439/2 "2012-05-08T08:03:37Z")

</div>

Use RpIdentifier in one file to define the repeated construct:

```auto
 
HTML/Rompager code here

```

Then call it up in the other files:

```auto
 
Page Header here 

```

---

<div class="post-metadata">

**Author:** ![gpotter](https://avatars.discourse-cdn.com/v4/letter/g/59ef9b/32.png) [@gpotter](https://forums.digi.com/u/gpotter)\
**Post date:** [May 22, 2012, 11:34pm UTC](https://forums.digi.com/t/rompager-syntax-how-to-prevent-code-duplication-in-stub-files/5439/3 "2012-05-22T23:34:19Z")

</div>

Thank you Steve that did the trick.
