Assuming you're working with STEP 7, typically a local variable (#xxx) is used only in a function or function block. The name of the local variable appears on the function or function block call as the name attached to one of the input or output pins. So I'm guessing you're asking if I'm looking at #out, how do I know it is really the value of Qx.x?
The only ways I can think of off the top of my head are maybe symbols, or using the real would I/O point as part of the name of the local variable. There may be a more direct way to do it, I just don't know what it is.