xuhdev/SingleCompile

Input and output statements problem

sulxxy opened this issue · 2 comments

HI,many thanks for the SingleCompile.I just found a problem but I couldn't determine whether it's a bug or just my fault.The problem is if there're some output statements(such as printf ) before input statements(such as scanf),then while I exucte :SCCompileRun,the contents of output statements won't be displayed until I've input some data(the scanf).I don't know why.

The output is always line buffered on Linux terminal. That is, before the end of a line, you won't be able to see the output, unless you change the settings, or call fflush() function.

Also, change this setting g:SingleCompile_usetee to 0 because tee always use full buffering.

Thanks very much.I try the second method as you said,and it works now!