GESC(3NCARG)
π¦ GESC β bestie edition β¨
ok so this is gesc, straight out of the NCAR GRAPHICS manual (that's the <purple>3NCARG</purple> section for those keeping score π
). Buckle up.
β¨ NAME β¨
gesc β like, it gives you an "Escape" hatch for all the non-standard GKS features πͺπ¨
πΈ DESCRIPTION πΈ
GESC (which literally stands for Escape, iykyk) hands you a standard-ish way to pull off nonstandard GKS stuff. NCAR GKS only has two user-accessible escape functions defined, bestie, and they are:
- one for changing the name of a metafile π
- and another for pausing in an X window βΈοΈ
That's it. That's the whole menu. π
π SYNOPSIS π
CALL GESC (FCTID, LIDR, IDR, MXODR, LODR, ODR)
π C-BINDING SYNOPSIS π
#include <ncarg/gks.h>
void gescape(Gint func_id, const Gescape_in_data *in_data, Gstore *store_data,Gescape_out_data **out_data);
π DESCRIPTION (yes again, the deets this time) π
FCTID(Integer, Input) β the function identifier, aka which activity are we doing rn. The legal values forFCTIDare"-1391"for changing a metafile name, and"-1396"for effecting a pause in an X window. No other values, babe, don't try it πLIDR(Integer, Input) β the dimension of theIDRinput data record array (scroll down forIDR, it's right there).IDR(Character * 80 Array, Input) β the input data record π₯. For calls toGESCwithFCTIDequal to-1391, this input data record should contain the desired metafile name left justified and blank filled. For calls toGESCwithFCTIDequal to-1396, it should contain the workstation identifier encoded as a five character number. got it? π«ΆMXODR(Integer, Input) β the maximum length of theODRoutput data record array (again,ODRis right below, patience pookie).LODR(Integer, Output) β the dimension of theODRoutput data record array.ODR (MXODR)(Character * 80 Array, Output) β the output data record π€.
π USAGE π
LIDR, MXODR, and LODR must always be at least "1" in value. Like, always always. no exceptions. periodt. π
β EXAMPLES β
So GESC can be used to dynamically change the name of an output metafile, and to do that you should use the calls GOPKS and GOPWK instead of OPN GKS. If you are using OPN GKS, go check the man page for SETUSV for changing the name of the metafile instead. β¨
To change the name of the output metafile inside your program, you should make a call similar to the following:
CHARACTER*80 MFNAME
CALL GOPKS (6,IDUM)
MFNAME = 'new.cgm.name'
CALL GESC(-1391,1,MFNAME,1,1,CDUM)
π¨ bestie listen: the call toGESCto change the metafile name must always occur just before the call toGOPWKthat opens a CGM workstation. And setting the environment variableNCARG_GKS_OUTPUToverrides any attempt to change the name of an output metafile via aGESCcall. so like, don't fight the env var, she wins π
See the "User's Guide for NCAR GKS-0A Graphics" for a more complete example of changing metafile names from within a code. π
Here's an example of a code that will create an X window, draw a line, and then pause waiting for a mouse click or a key click. main character behaviour fr π±οΈβ¨οΈ
CHARACTER*80 IREC,ODUM
CALL GOPKS(6,0)
CALL GOPWK(3,0,8)
CALL GACWK(3)
CALL LINE(0.,0.,1.,1.)
CALL SFLUSH
IREC = ' 3'
CALL GESC(-1396,1,IREC,1,1,ODUM)
CALL GDAWK(3)
CALL GCLWK(3)
CALL GCLKS
STOP
END
The functions FRAME and NGPICT are in general much easier to use and more flexible than the direct ESCAPE call for pausing in an X window. It is suggested that those functions be used. lowkey just use those, trust π§
π ACCESS π
To use GKS routines, load the NCAR GKS-0A library ncarg_gks. load her up bestie π«Ά
π¦ SEE ALSO π¦
Online: SETUSV, FRAME, NGPICT, gescape
Hardcopy: User's Guide for NCAR GKS-0A Graphics; NCAR Graphics Fundamentals, UNIX Version
πΈ COPYRIGHT πΈ
Copyright (C) 1987-2009 University Corporation for Atmospheric Research The use of this Software is governed by a License Agreement.
and that's the whole page, pookie π β this was the UNIX version from March 1993, slay, go forth and escape responsibly π β¨
π¦ where this page comes from
- debian bookworm: libncarg-dev 6.6.2.dfsg.1-1
- debian trixie: libncarg-dev 6.6.2.dfsg.1-10+b2
- ubuntu jammy: libncarg-dev 6.6.2-10build2
- ubuntu questing: libncarg-dev 6.6.2.dfsg.1-10build2
- ubuntu resolute: libncarg-dev 6.6.2.dfsg.1-12
- ubuntu stonking: libncarg-dev 6.6.2.dfsg.1-12build2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms