The "pause" part of system("pause") is Windows-specific.
You could use the Run function from the exec package to the same effect.
If all you want to do is pause until the user presses enter, add 'os'
and 'bufio' to your import list and try:
bufio.NewReader(os.Stdin).ReadBytes('\n')
Andrew
@echo off
color 2
title Go compiler
echo Go compiler
set /p name=Enter file name:
:start
cls
echo Go: %name%.go
start 8g %name%.go
start 8l -o %name%.exe %name%.8
IF NOT EXIST "%name%.8" DEL %name%.exe
IF NOT EXIST "%name%.8" msg * Compiled problem
IF EXIST "%name%.8" start %name%.exe
On 10 Юни, 16:09, mattn <mattn...@gmail.com> wrote:
> Смятате ли означава пауза в cmd.exe?Това трябва да се обадите на следните.
>
> "CMD / C пауза"
>
> Благодаря.
>
> На 10 юни, деветстотин четиресет и шеста година ч., "Ivan.h" <Ivan.hidz...@ gmail.com> написа:
>
>
>
> > Отидете там нещо като система ("пауза") на C + +?
Note that this is only good once.
If stdin is not a user typing at a terminal
it may buffer more bytes past the \n it
is looking for. And then because the
reader is discarded after this line, the
bytes are gone.
Russ