How to get a double quote in a text string

From: Mary Haley (haley AT XXXXXX)
Date: Tue Feb 18 2003 - 15:55:07 MST

  • Next message: David Reusch: "Header lines in ascii input files"

    FYI for NCL users:

    A user personally asked me about how to include a double quote as part
    of a text string in NCL, and I thought I'd share the answer I
    received from Dave Brown.

    Use the "integertochar" function:

    to first convert the character that represents a double quote to its
    integer representation. Then, use this new representation as part of a
    string you want to plot, just by concatenating it in the appropriate

    For example, try the following script:

    load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
        wks = gsn_open_wks("x11","test")

        dblquote = integertochar(34) ; decimal 34 is a double quote in the
                                        ; standard ASCII table

        title = dblquote + "This is a title with double quotes" + dblquote
        txres = True
        txres@txFontHeightF = 0.03

    ncl-talk mailing list
    ncl-talk AT

    This archive was generated by hypermail 2b29 : Tue Feb 18 2003 - 16:00:12 MST