Pic language
Encyclopedia
In computing
Computing
Computing is usually defined as the activity of using and improving computer hardware and software. It is the computer-specific part of information technology...

, Pic is a domain-specific programming language
Programming language
A programming language is an artificial language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs that control the behavior of a machine and/or to express algorithms precisely....

 by Brian Kernighan
Brian Kernighan
Brian Wilson Kernighan is a Canadian computer scientist who worked at Bell Labs alongside Unix creators Ken Thompson and Dennis Ritchie and contributed to the development of Unix. He is also coauthor of the AWK and AMPL programming languages. The 'K' of K&R C and the 'K' in AWK both stand for...

 for specifying diagram
Diagram
A diagram is a two-dimensional geometric symbolic representation of information according to some visualization technique. Sometimes, the technique uses a three-dimensional visualization which is then projected onto the two-dimensional surface...

s in terms of objects such as boxes with arrows between them. The pic compiler
Compiler
A compiler is a computer program that transforms source code written in a programming language into another computer language...

 translates this description into concrete drawing commands. Pic is a procedural programming language, with variable assignment, macros, conditionals, and looping. The language is an example of a little language originally intended for the comfort of non-programmers in the Unix environment (Bentley
Jon Bentley
Jon Louis Bentley is a researcher in the field of computer science. He is credited with the invention of the k-d tree....

 1988).

Pic was first implemented, and is still most typically used, as a preprocessor
Preprocessor
In computer science, a preprocessor is a program that processes its input data to produce output that is used as input to another program. The output is said to be a preprocessed form of the input data, which is often used by some subsequent programs like compilers...

 in the troff
Troff
troff is a document processing system developed by AT&T for the Unix operating system.-History:troff can trace its origins back to a text formatting program called RUNOFF, written by Jerome H. Saltzer for MIT's CTSS operating system in the mid-1960s...

 document processing system. The pic preprocessor filters
Filter (software)
A filter is a computer program to process a data stream. Some operating systems such as Unix are rich with filter programs. Even Windows has some simple filters built into its command shell, most of which have significant enhancements relative to the similar filter commands that were available in...

 a troff document, replacing diagram descriptions by concrete drawing commands, and passing the rest of the document through without change.

A version of pic is included in groff
Groff (software)
Groff is the GNU replacement for the troff and nroff text formatters. It is an original implementation written primarily in C++ by James Clark and is modeled after ditroff, including many extensions. The first version, 0.3.1, was released June 1990. The first stable version, 1.04, was announced in...

, the GNU
GNU
GNU is a Unix-like computer operating system developed by the GNU project, ultimately aiming to be a "complete Unix-compatible software system"...

 version of troff. GNU pic can also act as a preprocessor for TeX
TeX
TeX is a typesetting system designed and mostly written by Donald Knuth and released in 1978. Within the typesetting system, its name is formatted as ....

 documents. Arbitrary diagram text can be included for formatting by the word processor to which the pic output is directed, and arbitrary post-processor commands can also be included. Dwight Aplevich's implementation, DPIC, can also generate postscript images by itself, as well as act as a preprocessor. The three principal sources of pic processors are GNU pic, found on many Linux
Linux
Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...

 systems, and dpic, both of which are free, and the original AT&T pic.

Pic has some similarity with MetaPost
MetaPost
MetaPost refers to both a programming language and the interpreter of the MetaPost programming language. Both are derived from Donald Knuth's Metafont language and interpreter. MetaPost excels at producing diagrams in the PostScript programming language from a geometric/algebraic description...

 and the DOT language
DOT language
DOT is a plain text graph description language. It is a simple way of describing graphs that both humans and computer programs can use. DOT graphs are typically files that end with the .gv extension. The .gv extension is preferred, as .dot also is used by Microsoft Office 2003.Various programs...

.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK