title: Print variable in batch file
body: <p>I am trying to print a variable in parenthesised code which is assigned a value using other variable in batch file.</p>
  
  <p>Here is my code</p>
  
  <pre><code>@echo off
  SETLOCAL enableDelayedExpansion
  CALL initialize
  CALL fun
  :fun (
   @echo off
   Setlocal EnableDelayedExpansion
   Set "SOMEVAR=!OTHERVAR!"
   ECHO ..%SOMEVAR%
   EXIT /B 0
  )
  :initialize (
   set SOMEVAR=somevalue
  EXIT /B 0
  )
  </code></pre>
  
  <p>The output is just </p>
  
  <pre><code>..
  </code></pre>
  
  <p>How do i fix it so that i can assign value to somevar?</p>
  
  <p>Edit1: If i now try to print in following way it does its job </p>
  
  <pre><code>ECHO ..!SOMEVAR!
  </code></pre>
  
  <p>But my script uses lot of %SOMEVAR%. Does that mean i need to change them all?</p>
  
  <blockquote>
    <p>Note: Othervar is initialzed in other function and it does show proper value if it is echoed.</p>
  </blockquote>