# \`define macros usage

**URL:** <https://verificationacademy.com/forums/t/define-macros-usage/27530>\
**Category:** SystemVerilog\
**Tags:** SystemVerilog\
**Created:** [September 9, 2011, 11:37pm UTC](https://verificationacademy.com/forums/t/define-macros-usage/27530 "2011-09-09T23:37:53Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![dave\_59](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/dave_59/32/4499_2.png) [@dave\_59](https://verificationacademy.com/forums/u/dave_59)\
**Post date:** [September 16, 2011, 6:38am UTC](https://verificationacademy.com/forums/t/define-macros-usage/27530/8 "2011-09-16T06:38:06Z")

</div>

_In reply to [dave\_59](https://verificationacademy.com/forums/t/define-macros-usage/27530/7):_

> So this means if i just use ``I , the expansion of macro `abc(1,a) would be :  
> assign abc[1] == R.duI\_clk\_x . Since its not defined as a separate token ??

Yes, that would be the result.

> Both R and I are arguments to the macro so why you say that no `R` is needed where as `I` is needed. Is it because the left hand side has no dependency on R or is it because R is not breaking the lexical variable ?

Correct again. What you call a lexical variable is what the compiler calls a token identifier. The compiler grabs text in chunks called tokens, before it knows what the identifier is (variable, typedef, module name). An identifier starts with a letter, followed by any number of alpha-numeric characters, as well as \_(underscore). Any other character ends the token.

> So here `I` is not used, why ?

Only [I] is needed because **I** is surrounded by characters that are not part of token identifiers.

---

_[View the full topic](https://verificationacademy.com/forums/t/define-macros-usage/27530)._
