This tutorial explains how single (&), double (&&) and Triple (&&&) ampersand macro variables are resolved.

The scanner reads from left to right.

**Example**%let x=temp;

%let n=3;

%let x3=result;

%let temp3 = result2;

**Check how multiple ampersand macro variables work -**%put &x&n;

%put &&x&n;

%put &&&x&n;

**Rule :**

- &x&n : Macro variable X resolves first to temp and then N resolves to 3.
**Output : temp3** - &&x&n : Two ampersands (&&) resolves to one ampersand (&) and scanner continues and then N resolves to 3 and then
**&x3 resolves to result**.**Output : result** - &&&x&n : First two ampersands (&&) resolves to & and then X resolves to temp and then N resolves to 3. In last,
**&temp3 resolves to result2. Output : result2**

good explantation

ReplyDeleteThank you for stopping by my blog!

Deletenice explanation

ReplyDeleteThank you for your feedback.

DeleteVery well Explained..Thanks.

ReplyDeletewell explained...thank you

ReplyDeleteGreat explanation (Y)

ReplyDeleteGreat explanation (Y)

ReplyDeleteGreat stuff...keep posting

ReplyDeleteVery good stuff, really helps me a lot! Thank you very much!

ReplyDeleteGreat explanation！ Thank you!

ReplyDeleteamazing explanation. totally appreciate you effort i building these examples. Hats off.

ReplyDeletewhat if I have &&&&&&&&&x&n ? can you please explain ?

ReplyDelete&&&&&&&&&x&n will give you result2

DeleteWell explained.

ReplyDeleteCrystal Clear..!!

ReplyDeletevery good explanation

ReplyDelete