next up previous contents
Next: Convert to PostScript Up: Overview of pad2ps series Previous: Overview of pad2ps series


At first, with an editor

Figure 1: Addition from 1 to N

Because pad2ps series are tools to draw PAD figures from a text file, you first need to create a PAD source using an editor. A PAD source is written following PADEL(PAD Expression Language) syntax. The detail about PADEL is fully described in Chapter 3, so I will give you one example for now. The following file will produce the PAD figure in Figure 1.

If you are familiar to C language, you probably notice the source resembles C syntax; To draw PAD figure with pad2ps series, you need to create C-like file like this one.

    Addition from 1 to N
        input N
        if(N > 1){
            sum = 0
            for(i = 1 , N){
                sum = sum + i
            print sum

Let's save this file as foo.pad.


Go back to pad2ps - automatic PAD drawer.
Go back to Seiichi Yoshida's Home Page.
Copyright(C) Seiichi Yoshida (comet@aerith.net). All rights reserved.
Sun Nov 10 01:36:04 JST 1996