开发者

What's up with stdout in Gambit-C Scheme?

开发者 https://www.devze.com 2022-12-13 21:36 出处:网络
What\'s up with this, how do I capture the output from my Gambit-C program? $ gsi -e \"(pp开发者_开发百科 \'hello?)\"

What's up with this, how do I capture the output from my Gambit-C program?

$ gsi -e "(pp开发者_开发百科 'hello?)"
hello?

$ gsi -e "(pp 'hello?)" >asdf
hello?

$ gsi -e "(pp 'hello?)" 2>asdf
hello?

$ cat asdf

It should have put the output of the program into asdf, but it's empty! Is there a compile-time or run-time option I can set to make it treat stdout like a normal unix program? (Preferably compile-time)


I am not familiar with pp, but you seem to want pretty-print:

$ gsi -e "(pretty-print 'hello?)" > test
$ cat test
hello?
$
0

精彩评论

暂无评论...
验证码 换一张
取 消