是否有一个“傻瓜Postscript中的文件IO”? [英] Is there a "File IO in Postscript for Dummies"?
问题描述
这一切都很好,但我想在输出中注入一些变化,并且写下了我最近的问题输出一个可玩的填字游戏网格,以鼓励图形格式的输入。为了表示愿意,我已经开始尝试在postscript中一起讨论参考实现。唉,我对这个语言完全陌生,在做基本文件IO时遇到了麻烦。有谁知道一个基本的资源,涵盖了这个话题?
我知道
file
(%stdin)
令牌
readstring
readline
什么是最后三个回报,以及如何处理它。
有有几个返回一个<值GT; < / code> pair,并且我可以使用
if
来测试布尔值。那么什么呢?
关于postscript的一本好书是Gleen Reid的在后记中思考你曾经可以从他的网站上免费获得这本书供个人使用,但是它已经失效了。您仍然可以从
下载它 http ://replay.waybackmachine.org/20090621100720/http://www.rightbrain.com/pages/books.html
第14章涵盖文件io并有示例代码。
Much of the code-golf played on Stack Overflow involved ASCII figures, and codegolf.SE is shaping up the same way.
That's all well and good, but I'd like to inject a little variety into the output, and have written my recent question Output a playable crossword grid explicitly to encourage graphical format entries.
To show willing, I've started trying to hack together a reference implementation in postscript. Alas, I'm completely new to the language, and am having trouble doing basic file IO. Does anyone know of a basic resource that covers the topic?
I am aware of
file
(%stdin)
token
readstring
readline
but I am pretty unclear on exactly what the last three return and how one manipulates it after you've got it.
I have figured out that several return a <value> <boolean>
pair, and that I can use if
to test the boolean. Then what?
A good book about postscript is "thinking in postscript" by Gleen Reid. You used to be able to get the book free for personal use from his website, but its down. You can still download it from http://replay.waybackmachine.org/20090621100720/http://www.rightbrain.com/pages/books.html
Chapter 14 covers file io and has sample code.
这篇关于是否有一个“傻瓜Postscript中的文件IO”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!