pragmagic / vscode-nim

An extension for VS Code which provides support for the Nim language.
Other
237 stars 37 forks source link

Can't see stdout #85

Open R3D9477 opened 6 years ago

R3D9477 commented 6 years ago

Hi. Why I can't see stdout (in VSCode console) before looped stdin?

import strutils

stdout.write("Commands:\n")
stdout.write("  1 - start\n")
stdout.write("  2 - get server status\n")
stdout.write("  3 - run client\n")
stdout.write("  4 - stop and exit\n")

var cmd = 0
while (cmd != 4):
  stdout.write("> ")
  try:
    cmd = parseInt(stdin.readLine().strip())
  except:
    cmd = 0
  case cmd:
    of 2:
      discard
    of 3:
      discard
    else: discard

VSCode: 1

Linux terminal: 2