# Simple help with local macros

#### dieffenbachia

##### New Member
This seems like a ridiculous request for help but I just cannot figure out where I'm going wrong. I have tried replicating the examples in the stata manual and as you can see from the script below my local macros seem to be misbehaving.

. local shortcut "myvar thisvar thatvar"

. list shortcut'
no variables defined
r(111);

. local cmd "clear"

. cmd'

. local prefix "my"

. local suffix "var"

. display prefix' suffix'
r(111);

. local eqn "2+2"

. local result = 2+2

. display eqn' result'
44

. display eqn'
4

This last test of local I found especially bizarre since I thought stata was meant to copy the "2+2" as a string and the expression result = 2+2 as the answer. It seems to be storing strings incorrectly?
Can anyone help?

#### dieffenbachia

##### New Member
ahh I think I have it: I need to put double quotes if I don't want stata to evaluate eqn' in my previous example.
i.e.

display "`eqn'"
2+2