---------------------------------------------------------------------

next up previous contents
Next: Write comment Up: About parameter variables Previous: Set overall title

---------------------------------------------------------------------

Write messages

You can write messages in PAD figure using the parameter message .

This parameter should be used at the place where you want to write a message. The content is to be set as an argument. Here is an example:

    {
        input N
    
        /* pad2ps: message = Input each element */
        for(i = 1, N)
            input A[i]
    }

The result figure is the following:

tex2html_wrap2608

You should consider the messages as a normal statement without frame, not as comment or parameter. It means the place where you can put messages are the place where you can put the normal statement. And the message is regarded as a statement. Therefore, the following is invalid:

    /* pad2ps: message = Add/Subtract 1 */
    
    {
        for(i = 1, N){
            if( A[i] > 0 )
                /* pad2ps: message = Add 1 if positive */
                m = m + 1
            else
                /* pad2ps: message = Subtract 1 if negative or 0 */
                m = m - 1
        }
    }

This should be written as the following: 

    {
        /* pad2ps: message = Add/Subtract 1 */
    
        for(i = 1, N){
            if( A[i] > 0 ) {
                /* pad2ps: message = Add 1 if positive */
                m = m + 1
            } else {
                /* pad2ps: message = Subtract 1 if negative or 0 */
                m = m - 1
            }
        }
    }

---------------------------------------------------------------------

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