title: What's different between "$myvariable =" and Set-Variable in PowerShell?
body: <p>When I study PowerShell scripting language, I try to use "Write-Output" command to display variable.</p>
  
  <p>I use a different method to create variables.</p>
  
  <p>Example:</p>
  
  <p><code>$myvariable = 0x5555</code></p>
  
  <p><code>Set-Variable -Name myvariable2 -Value 0x5555</code></p>
  
  <p>The data type of these two variables is Int32.</p>
  
  <p>When I use the command as below,</p>
  
  <p><code>Write-Output $myvariable $myvariable2</code></p>
  
  <p>the result is <code>21845</code> and <code>0x5555</code>.</p>
  
  <p>What's different between these two variables?</p>
  
  <p>How can I display format result like <code>printf %d %x</code>? </p>