GASK Routines


When you use GASK routines, remember the following:

  • All arguments are required.

  • Most arguments are expressed as variable names . You can use any valid SAS variable name .

  • If character arguments are expressed as character strings, they must be enclosed in quotation marks.

  • All character variable names used as arguments must be declared in a previous LENGTH statement.

  • GASK routines do not change the operating state.

  • PUT statements display a value returned by a routine in the SAS log.

  • OUTPUT statements write a value that is returned by a routine to a data set.

GASK routines enable you to check these current attribute settings:

  • ASF

  • ASPECT

  • CATALOG

  • CBACK

  • CLIP

  • COLINDEX

  • COLREP

  • DEVICE

  • FILCOLOR

  • FILINDEX

  • FILREP

  • FILSTYLE

  • FILTYPE

  • GRAPHLIST

  • HPOS

  • HSIZE

  • HTML

  • LINCOLOR

  • LININDEX

  • LINREP

  • LINTYPE

  • LINWIDTH

  • MARCOLOR

  • MARINDEX

  • MARREP

  • MARSIZE

  • MARTYPE

  • MAXDISP

  • NUMGRAPH

  • OPENGRAPH

  • PATREP

  • STATE

  • TEXALIGN

  • TEXCOLOR

  • TEXEXTENT

  • TEXFONT

  • TEXHEIGHT

  • TEXINDEX

  • TEXPATH

  • TEXREP

  • TEXUP

  • TRANS

  • TRANSNO

  • VIEWPORT

  • VPOS

  • VSIZE

  • WINDOW

  • WSACTIVE

  • WSOPEN

ASF

Finds whether an aspect source flag is bundled or separate

Operating States: GKOP, SGOP, WSAC, WSOP

Return Codes: 0, 8

Syntax

CALL GASK( ASF , attribute, status, return-code-variable );

Description

The GASK( ASF , ) routine returns the aspect source flag (ASF) of a particular attribute. Possible ASF values are BUNDLED (associated with a bundle index) and INDIVIDUAL (separate from a bundle index). GASK( ASF , ) returns the default value INDIVIDUAL if you have not set the ASF for an attribute.

Argument Definitions

attribute

character string enclosed in quotes or character variable name with one of the following values:

  • FILCOLOR

  • FILSTYLE

  • FILTYPE

  • LINCOLOR

  • LINTYPE

  • LINWIDTH

  • MARCOLOR

  • MARSIZE

  • MARTYPE

  • TEXCOLOR

  • TEXFONT.

status

character variable name; returns either the value BUNDLED or INDIVIDUAL.

return-code-variable

numeric variable name; returns the return code of the routine call.

See Also

  • ASF on page 1463

  • FILCOLOR on page 1469

  • FILSTYLE on page 1471

  • FILTYPE on page 1473

  • LINCOLOR on page 1476

  • LINTYPE on page 1479

  • LINWIDTH on page 1479

  • MARCOLOR on page 1480

  • MARSIZE on page 1483

  • MARTYPE on page 1483

  • TEXCOLOR on page 1488

  • TEXFONT on page 1489

ASPECT

Finds the aspect ratio

Operating States: All

Return Codes:

Syntax

CALL GASK( ASPECT , aspect, return-code-variable );

Description

The GASK( ASPECT , ) routine returns the current aspect ratio used to draw graphics output. GASK( ASPECT , ) searches for the current aspect ratio in the following order:

  1. the aspect ratio set with the GSET( ASPECT , ) function

  2. the ASPECT= graphics option

  3. the device s default aspect ratio found in the device entry. For more information on device entries, see Chapter 31, The GDEVICE Procedure, on page 915.

Argument Definitions

aspect

numeric variable name; returns the aspect ratio.

return-code-variable

numeric variable name; returns the return code of the routine call.

See Also

  • ASPECT= graphics option (see ASPECT on page 262)

  • ASPECT on page 1465

CATALOG

Finds the catalog for the graphs

Operating States: All

Return Codes:

Syntax

CALL GASK( CATALOG , libref, memname, return-code-variable );

Description

The GASK( CATALOG , ) routine returns the libref and the name of the current output catalog. GASK( CATALOG , ) returns the default catalog, WORK.GSEG, if no other catalog has been specified with the GSET( CATALOG , ) function.

Argument Definitions

libref

character variable name; returns the libref of the library in which the current catalog is stored.

memname

character variable name; returns the name of the current output catalog.

return-code-variable

numeric variable name; returns the return code of the routine call.

See Also

  • CATALOG on page 1465

  • NUMGRAPH on page 1427

  • OPENGRAPH on page 1428

CBACK

Finds the background color

Operating States: All

Return Codes:

Syntax

CALL GASK( CBACK , cback, return-code-variable );

Description

The GASK( CBACK , )routine returns the current background color. GASK( CBACK , )searches for the current background color in the following order:

  1. the background color selected with the GSET( CBACK , )function

  2. the CBACK= graphics option

  3. the default background color for the device found in the device entry. For more information about device entries, see Chapter 31, The GDEVICE Procedure, on page 915.

Argument Definitions

cback

character variable name; returns the background color name.

return-code-variable

numeric variable name; returns the return code of the routine call.

See Also

  • CBACK= graphics option (see CBACK on page 266)

  • CBACK on page 1466

CLIP

Finds whether clipping is on or off

Operating States: GKOP, SGOP, WSAC, WSOP

Return Codes: 55, 56

Syntax

CALL GASK( CLIP , status );

Description

The GASK( CLIP , )routine checks whether clipping outside of viewports is enabled or disabled. One of the two following messages is displayed when this routine is called:

 NOTE: Clipping is ON. 

or

 NOTE: Clipping is OFF. 

Clipping is OFF by default.

Argument Definitions

status

numeric variable name; returns the current setting, 55 (ON) or 56 (OFF), for clipping.

See Also

  • CLIP on page 1467

COLINDEX

Finds the color indexes that have colors associated with them

Operating States: SGOP

Return Codes: 0, 4, 86, 87

Syntax

CALL GASK( COLINDEX , n, index-array, return-code-variable );

Description

The GASK( COLINDEX , )routine returns the color indexes that currently have colors assigned to them.

Argument Definitions

n

numeric constant or numeric variable name; tells how many color indexes you want returned. If n is expressed as a variable, the variable must be initialized . The variable returns the number of colors currently assigned. If n is expressed as a constant, it will not return this value.

index-array

list of numeric variables into which the used color index numbers are returned. The list of variable names can be members of an array or OF argument lists (where the arguments are variables). If you are using an array, index-array must have been declared as an array. The dimension of the array is determined by the number of color indexes you want returned. Refer to the discussion of ARRAY in SAS Language Reference: Dictionary for more information about OF argument lists.

return-code-variable

numeric variable name; returns the return code of the routine call.

See Also

  • COLREP on page 1410

  • COLREP on page 1467

COLREP

Finds the color name associated with a color index

Operating States: SGOP

Return Codes: 0, 4, 86, 87

Syntax

CALL GASK( COLREP , color-index, color, return-code-variable );

Description

The GASK( COLREP , )routine returns the predefined SAS color name associated with a color index. GASK( COLREP , )searches for the current color assigned to a color index in the following order:

  1. the color selected by the GSET( COLREP , ) function.

  2. the COLORS= graphics option. If color-index is 2, the routine returns the second color from the colors list of the COLORS= graphics option.

  3. the device s default colors list found in the device entry. If color-index is 2, the routine returns the second color from the default colors list.

See SAS Color Names and RGB Values on page 99 for a list of SAS predefined color names.

Argument Definitions

color-index

numeric constant; indicates the color index for which you want to check the color. Valid values are 1 to 256, inclusive.

color

character variable name; returns the color name associated with color-index .

return-code-variable

numeric variable name; returns the return code of the routine call.

See Also

  • COLINDEX on page 1409

  • COLREP on page 1467

DEVICE

Finds the output graphics device

Operating States: All

Return Codes:

Syntax

CALL GASK( DEVICE , device, return-code-variable );

Description

The GASK( DEVICE , )routine returns the current device driver. This routine returns the device driver set by one of the following methods :

  • the GSET( DEVICE , )function

  • the DEVICE= graphics option

  • the device driver you entered in the DEVICE prompt window

  • the device driver you entered in the OPTIONS window.

There is no default value for a device driver. To use DSGI, you must specify a device driver. For more information about setting device drivers, see Selecting a Device Driver on page 43.

Argument Definitions

device

character variable name; returns the name of the device driver.

return-code-variable

numeric variable name; returns the return code of the routine call.

See Also

  • DEVICE= graphics option (see DEVICE on page 279)

  • DEVICE on page 1468

FILCOLOR

Finds the color index of the color to be used to draw fill areas

Operating States: GKOP, SGOP, WSAC, WSOP

Return Codes: 0, 8

Syntax

CALL GASK( FILCOLOR , color-index, return-code-variable );

Description

The GASK( FILCOLOR , )routine returns the current fill color. If a GSET( FILCOLOR , )function has not been previously submitted, GASK( FILCOLOR , )returns the default value, 1. The color index returned corresponds to a color specification in the following order:

  1. the color assigned to a color name with the GSET( COLREP , )function

  2. the n th color in the colors list of the COLORS= graphics option

  3. the n th color in the device s default colors list found in the device entry.

Argument Definitions

color-index

numeric variable name; returns the color index of the fill color currently selected.

return-code-variable

numeric variable name; returns the return code of the routine call.

See Also

  • COLORS= graphics option (see COLORS on page 272)

  • COLREP on page 1410

  • COLREP on page 1467

  • FILCOLOR on page 1469

FILINDEX

Finds the bundle of fill area attributes that is active

Operating States: GKOP, SGOP, WSAC, WSOP

Return Codes: 0, 8

Syntax

CALL GASK( FILINDEX , index, return-code-variable );

Description

The GASK( FILINDEX , )routine asks which fill bundle is active. If no fill bundles have been previously defined with GSET( FILREP , )or activated with GSET( FILINDEX , ), GASK( FILINDEX , )returns the default value, 1.

Argument Definitions

index

numeric variable name; returns the index of the fill bundle currently selected.

return-code-variable

numeric variable name; returns the return code of the routine call.

See Also

  • FILREP on page 1413

  • FILREP on page 1470

  • FILINDEX on page 1470

FILREP

Finds the fill area attributes associated with a bundle index

Operating States: GKOP, WSOP, WSAC, SGOP

Return Codes: 0, 8, 75, 76

Syntax

CALL GASK ( FILREP , index, color-index, interior, style-index, return-code-variable );

Description

The GASK( FILREP , )routine returns the color, type of interior, and fill pattern associated with a specific fill bundle. If the bundle indicated by index has not been previously defined with the GSET( FILREP , )function, DSGI issues the following error message:

 ERROR: A representation for the specified fill area index has     not been defined on this workstation. 

Argument Definitions

index

numeric constant or numeric variable name; indicates the fill bundle to check. Valid values are 1 to 20, inclusive. If index is expressed as a variable, the variable must be initialized to a value between 1 and 20.

color-index

numeric variable name; returns the color index of the fill color associated with the bundle. The color index that is returned corresponds to a color specification in the following order:

  1. a color index assigned to a color name with the GSET( COLREP , )function

  2. the n th color in the colors list of the COLORS= graphics option

  3. the n th color in the device s default colors list found in the device entry.

interior

character variable name; returns the style of the interior associated with the bundle index “ that is, one of the following values:

  • HATCH

  • HOLLOW

  • PATTERN

  • SOLID.

style-index

numeric variable name; returns the index of the fill pattern associated with the bundle. See the FILSTYLE on page 1471 for the fill patterns represented by style-index .

return-code-variable

numeric variable name; returns the return code of the routine call.

See Also

  • COLORS= graphics option (see COLORS on page 272)

  • FILINDEX on page 1413

  • COLREP on page 1467

  • FILREP on page 1470

  • FILSTYLE on page 1471

FILSTYLE

Finds the style of the fill area when FILTYPE is PATTERN or HATCH

Operating States: GKOP, SGOP, WSAC, WSOP

Return Codes: 0, 8

Syntax

CALL GASK( FILSTYLE , style-index, return-code-variable );

Description

The GASK( FILSTYLE , )routine returns the current fill style of the interior when FILTYPE is PATTERN or HATCH. If no fill style has been previously selected with the GSET( FILSTYLE , )function, GASK( FILSTYLE , )returns the default value, 1.

Argument Definitions

style-index

numeric variable name; returns the index of the fill pattern associated with the bundle. See the FILSTYLE on page 1471 for the interior styles represented by style-index .

return-code-variable

numeric variable name; returns the return code of the routine call.

See Also

  • FILTYPE on page 1415

  • FILSTYLE on page 1471

  • FILTYPE on page 1473

FILTYPE

Finds the type of the interior of the fill area

Operating States: GKOP, SGOP, WSAC, WSOP

Return Codes: 0, 8

Syntax

CALL GASK( FILTYPE , interior, return-code-variable );

Description

The GASK( FILTYPE , )routine returns the current fill type. If no fill type has been previously selected with the GSET( FILTYPE , )function, GASK( FILTYPE , )returns the default value, HOLLOW.

Argument Definitions

interior

character variable name; returns the fill type that is active, that is, one of the following values:

  • HATCH

  • HOLLOW

  • PATTERN

  • SOLID.

return-code-variable

numeric variable name; returns the return code of the routine call.

See Also

  • FILSTYLE on page 1414

  • FILTYPE on page 1415

GRAPHLIST

Finds the names of segments in the current catalog

Operating States: GKOP, SGOP, WSAC, WSOP

Return Codes: 0, 8

Syntax

CALL GASK( GRAPHLIST , n, name-array, return-code-variable );

Description

The GASK( GRAPHLIST , )routine lists the first n names of the graphs that are in the current catalog. If a catalog has not been previously specified with the GRAPH( CATALOG , )function, the routine returns names from the default catalog, WORK.GSEG.

The names returned are any of the following:

  • those specified in the GRAPH( CLEAR , )function

  • if the name is omitted from the GRAPH( CLEAR )function, some form of DSGI: for example, DSGI, DSGI1, or DSGI2.

  • the name specified in the NAME= option of a graphics procedure

  • graphs previously created by other graphics procedures and already in the catalog.

Argument Definitions

n

numeric variable name; tells the maximum number of graph names you want returned. If you express n as a variable, the variable must be initialized to the maximum number of graph names you want returned.

name-array

list of character variable names into which the graph names will be returned. The list of variable names can be members of an array or OF argument lists (where the arguments are variables). If you are using an array, name-array must be declared as an array. The dimension of the array is determined by the number of color indexes you want returned. See the discussion for ARRAY in SAS Language Reference: Dictionary for more information about OF argument lists.

return-code-variable

numeric variable names; returns the return code of the routine call.

See Also

  • CLEAR on page 1457

HPOS

Finds the number of columns

Operating States: All

Return Codes:

Syntax

CALL GASK( HPOS , hpos, return-code-variable );

Description

The GASK( HPOS , )routine returns the number of columns currently in the graphics output area. GASK( HPOS , )searches for the current number of columns in the following order:

  1. the value selected in the GSET( HPOS , )function

  2. the value of the HPOS= graphics option

  3. the device s default HPOS value found in the device entry.

Argument Definitions

hpos

numeric variable name; returns the number of columns in the graphics output area.

return-code-variable

numeric variable name; returns the return code of the routine call.

See Also

  • HSIZE on page 1418

  • HPOS on page 1474

  • HPOS= graphics option (see HPOS on page 315)

HSIZE

Finds the horizontal dimension of the graphics output area

Operating States: All

Return Codes:

Syntax

CALL GASK( HSIZE , hsize, return-code-variable );

Description

The GASK( HSIZE , )routine returns the current horizontal dimension, in inches, of the graphics output area. GASK( HSIZE , )searches for the current horizontal dimension in the following order:

  1. the value selected in the GSET( HSIZE , )function

  2. the value of the HSIZE= graphics option

  3. the device s default HSIZE found in the device entry.

Argument Definitions

hsize

numeric variable name; the size of the graphics output area in the x dimension (in inches).

return-code-variable

numeric variable name; returns the return code of the routine call.

See Also

  • HPOS on page 1417

  • HSIZE on page 1475

  • HSIZE= graphics option (see HSIZE on page 315)

HTML

Finds the HTML string that is in effect when one of the following graphic elements is drawn: bar, ellipse, fill, mark, pie, and text.

Operating States: GKOP, SGOP, WSAC, WSOP

Return Codes: 0, 8

Syntax

CALL GASK( HTML , string, return-code-variable );

Description

The GASK( HTML , )routine returns the current HTML string. If a GSET( HTML , )function has not been previously submitted, GASK( HTML , )returns the default value, null.

Argument Definitions

string

the HTML string invoked when an affected DSGI graphic element in a web page is clicked.

return-code-variable

numeric variable name; returns the return code of the routine call.

See Also

  • BAR on page 1448

  • ELLIPSE on page 1450

  • FILL on page 1451

  • MARK on page 1453

  • PIE on page 1455

  • TEXT on page 1456

  • HTML on page 1475

LINCOLOR

Finds the current setting of the color to be used to draw lines

Operating States: GKOP, SGOP, WSAC, WSOP

Return Codes: 0, 8

Syntax

CALL GASK( LINCOLOR , color-index, return-code-variable );

Description

The GASK( LINCOLOR , )routine returns the current line color. If a GSET( LINCOLOR , )function has not been previously submitted, GASK( LINCOLOR , )returns the default value, 1. The color index returned corresponds to a color specification in the following order:

  1. the color specified in a GSET( COLREP , )function

  2. the n th color in the colors list of the COLORS= graphics option

  3. the n th color in the device s default colors list.

Argument Definitions

color-index

numeric variable name; returns the color index of the current line color.

return-code-variable

numeric variable name; returns the return code of the routine call.

See Also

  • COLORS= graphics option (see COLORS on page 272)

  • COLREP on page 1410

  • COLREP on page 1467

  • LINCOLOR on page 1476

LININDEX

Finds the index of the bundle of line attributes

Operating States: GKOP, SGOP, WSAC, WSOP

Return Codes: 0, 8

Syntax

CALL GASK( LININDEX , index, return-code-variable );

Description

The GASK( LININDEX , )routine returns the current line bundle. If no line bundles have been previously defined with GSET( LINREP , )or activated with GSET( LININDEX , ), GASK( LININDEX , )returns the default value, 1.

Argument Definitions

index

numeric variable name; returns the index of the current line bundle.

return-code-variable

numeric variable name; returns the return code of the routine call.

See Also

  • LINREP on page 1420

  • LININDEX on page 1477

  • LINREP on page 1478

LINREP

Finds the bundle of line attributes associated with an index

Operating States: GKOP, SGOP, WSAC, WSOP

Return Codes: 0, 8, 60, 61

Syntax

CALL GASK ( LINREP , index, color-index, width, type, return-code-variable );

Description

The GASK( LINREP , )routine returns the color, width, and line type associated with a specific line bundle. If the bundle indicated by index has not been previously defined with the GSET( LINREP , )function, DSGI issues the following error message:

 ERROR: A representation for the specified line type index has     not been defined on this workstation. 

Argument Definitions

index

numeric constant or numeric variable name; indicates the fill bundle to check. Valid values are 1 to 20, inclusive. If index is expressed as a variable, the variable must be initialized to a value between 1 and 20.

color-index

numeric variable name; returns the color index of the fill color associated with the bundle. The color index returned corresponds to a color specification in the following order:

  1. a color index assigned with the GSET( COLREP , )function

  2. the n th color in the colors list of the COLORS= graphics option

  3. the n th color in the device s default colors list.

width

numeric variable name; returns the line width (in pixels) associated with the bundle.

type

numeric variable name; returns the index of the line type associated with the bundle. Refer to Figure 7.22 on page 208 for representations of the line types.

return-code-variable

numeric variable name; returns the return code of the routine call.

See Also

  • COLORS= graphics option (see COLORS on page 272)

  • COLREP on page 1410

  • LININDEX on page 1420

  • COLREP on page 1467

  • LINREP on page 1478

LINTYPE

Finds the line type

Operating States: GKOP, SGOP, WSAC, WSOP

Return Codes: 0, 8

Syntax

CALL GASK( LINTYPE , type, return-code-variable );

Description

The GASK( LINTYPE , )routine returns the current line type. If no line type was previously selected with the GSET( LINTYPE , )function, GASK( LINTYPE , )returns the default value, 1.

Argument Definitions

type

numeric variable name; returns the index of the line type currently selected. Refer to Figure 7.22 on page 208 for representations of the line types.

return-code-variable

numeric variable name; returns the return code of the routine call.

See Also

  • LINTYPE on page 1479

LINWIDTH

Finds the line thickness

Operating States: GKOP, SGOP, WSAC, WSOP

Return Codes: 0, 8

Syntax

CALL GASK( LINWIDTH , width, return-code-variable );

Description

The GASK( LINWIDTH , )routine returns the current line width. If a line width has not been previously selected with the GSET( LINWIDTH , )function, GASK( LINWIDTH , )returns the default value, 1.

Argument Definitions

width

numeric variable name; returns the current line width (in units of pixels).

return-code-variable

numeric variable name; returns the return code of the routine call.

See Also

  • LINWIDTH on page 1479

MARCOLOR

Finds the color index of the color to be used to draw markers

Operating States: GKOP, SGOP, WSAC, WSOP

Return Codes: 0, 8

Syntax

CALL GASK( MARCOLOR , color-index, return-code-variable );

Description

The GASK( MARCOLOR , )routine returns the current marker color. If a GSET( MARCOLOR , )function has not been previously submitted, GASK( MARCOLOR , )returns the default value, 1. The color index returned corresponds to a color specification in the following order:

  1. the color selected in a GSET( COLREP , )function

  2. the n th color in the colors list of the COLORS= graphics option

  3. the n th color in the device s default colors list.

Argument Definitions

color-index

numeric variable name; returns the color index of the current marker color.

return-code-variable

numeric variable name; returns the return code of the routine call.

See Also

  • COLORS= graphics option (see COLORS on page 272)

  • COLREP on page 1410

  • COLREP on page 1467

  • MARCOLOR on page 1480

MARINDEX

Finds the index of the bundle of marker attributes currently selected

Operating States: GKOP, SGOP, WSAC, WSOP

Return Codes: 0, 8

Syntax

CALL GASK( MARINDEX , index, return-code-variable );

Description

The GASK( MARINDEX , )routine returns the current marker bundle. If no marker bundles have been previously defined with GSET( MARREP , )or activated with GSET( MARINDEX , ), GASK( MARINDEX , )returns the default value, 1.

Argument Definitions

index

numeric variable name; returns the index of the marker bundle currently selected.

return-code-variable

numeric variable name; returns the return code of the routine call.

See Also

  • MARREP on page 1424

  • MARINDEX on page 1481

  • MARREP on page 1482

MARREP

Finds the bundle of marker attributes associated with an index

Operating States: GKOP, SGOP, WSAC, WSOP

Return Codes: 0, 8, 64, 65

Syntax

CALL GASK( MARREP , index, color-index, size, type, return-code-variable );

Description

The GASK( MARREP )routine returns the color, size, and type of marker associated with a specific marker bundle. If the bundle indicated by index has not been previously defined with the GSET( MARREP , )function, DSGI issues the following error message:

 ERROR: A representation for the specified marker index has     not been defined on this workstation. 

Argument Definitions

index

numeric constant or numeric variable name; indicates the index of the fill bundle to check. Valid values are 1 to 20, inclusive. If index is expressed as a variable, the variable must be initialized to a value between 1 and 20.

color-index

numeric variable name; returns the color index of the fill color associated with the bundle. The color index returned corresponds to a color specification in the following order:

  1. a color index assigned with the GSET( COLREP , )function

  2. the n th color in the colors list of the COLORS= graphics option

  3. the n th color in the device s default colors list.

size

numeric variable name; returns the marker size in units of the current window system.

type

numeric variable name; the index of the marker type associated with the bundle. See the MARTYPE on page 1483 for an explanation of the marker indexes.

return-code-variable

numeric variable name; returns the return code of the routine call.

See Also

  • COLORS= graphics option (see COLORS on page 272)

  • COLREP on page 1410

  • COLREP on page 1467

  • MARINDEX on page 1481

  • MARREP on page 1482

  • MARTYPE on page 1483

MARSIZE

Finds the size of markers

Operating States: GKOP, SGOP, WSAC, WSOP

Return Codes: 0, 8

Syntax

CALL GASK( MARSIZE , size, return-code-variable );

Description

The GASK( MARSIZE , )routine returns the current marker size. If no marker size has been previously selected with the GSET( MARSIZE , )function, GASK( MARSIZE , )returns the default value, 1.

Argument Definitions

size

numeric variable name; returns the marker size in units of the current window system.

return-code-variable

numeric variable name; returns the return code of the routine call.

See Also

  • MARSIZE on page 1483

MARTYPE

Finds the kind of markers

Operating States: GKOP, SGOP, WSAC, WSOP

Return Codes: 0, 8

Syntax

CALL GASK( MARTYPE , type, return-code-variable );

Description

The GASK( MARTYPE , )routine returns the current marker type. If no marker type has been previously selected with the GSET( MARTYPE , )function, GASK( MARTYPE , )returns the default value, 1.

Argument Definitions

type

numeric variable name; returns the index of the marker type currently selected. See the function MARTYPE on page 1483 for an explanation of the indexes for markers.

return-code-variable

numeric variable name; returns the return code of the routine call.

See Also

  • MARTYPE on page 1483

MAXDISP

Finds the maximum display area size

Operating States: GKOP, SGOP, WSAC, WSOP

Return Codes: 0, 8

Syntax

CALL GASK ( MAXDISP , units, x-dim, y-dim, x-pixels, y-pixels, return-code-variable );

Description

The GASK( MAXDISP , ) routine returns the dimensions of the maximum display area for the device. This routine is useful when you need to know the maximum display area in order to determine the aspect ratio or to scale a graph.

There is a difference between the maximum display size returned when the operating state is not SGOP and when it is SGOP. The full addressable display area is returned when the operating state is not SGOP, and the display area minus room for titles and footnotes is returned when the operating state is SGOP.

Argument Definitions

units

numeric variable name; returns a 1 to show that x-dim and y-dim are in meters .

x-dim

numeric variable name; returns the dimension, in meters, in the x direction.

y-dim

numeric variable name; returns the dimension, in meters, in the y direction.

x-pixels

numeric variable name; returns the number of pixels in the x direction.

y-pixels

numeric variable name; returns the number of pixels in the y direction.

return-code-variable

numeric variable name; returns the return code of the routine call.

See Also

  • HSIZE on page 1418

  • VSIZE on page 1443

  • HSIZE on page 1475

  • VSIZE on page 1499

NUMGRAPH

Finds the number of graphs in the current catalog

Operating States: GKOP, SGOP, WSAC, WSOP

Return Codes: 0, 8

Syntax

CALL GASK( NUMGRAPH , n, return-code-variable );

Description

The GASK( NUMGRAPH , ) routine returns how many graphs are in the current catalog. The catalog checked is the catalog selected in the GSET( CATALOG , ) function, if specified; otherwise , it is the default catalog, WORK.GSEG.

Argument Definitions

n

numeric variable name; returns the number of graphs in the current catalog.

return-code-variable

numeric variable name; returns the return code of the routine call.

See Also

  • CATALOG on page 1407

  • CATALOG on page 1465

OPENGRAPH

Finds the name of the segment currently open

Operating States: SGOP

Return Codes: 0, 4

Syntax

CALL GASK( OPENGRAPH , name, return-code-variable );

Description

The GASK( OPENGRAPH , ) routine returns the name of the graph that is currently open.

The name returned is one of the following:

  • the name specified in the GRAPH( CLEAR , ) function

  • if the name is omitted from the GRAPH( CLEAR , ) function, some form of DSGI: for example, DSGI, DSGI1, and DSGI2.

Argument Definitions

name

character variable name; returns the name of the graph that is currently open.

return-code-variable

numeric variable name; returns the return code of the routine call.

See Also

  • CLEAR on page 1457

PATREP

Finds the pattern name assigned to a style index

Operating States: GKOP, SGOP, WSAC, WSOP

Return Codes: 0, 8. 79

Syntax

CALL GASK( PATREP , index, pattern-name, hatch-name, return-code-variable);

Description

The GASK( PATREP , ) routine returns the pattern name assigned to a style index.

Argument Definitions

index

numeric variable name; returns the index of the pattern currently selected.

pattern-name

character variable name; returns the name of the pattern at the specified index.

hatch-name

character variable name; returns the name of the hatch at the specified index.

return-code-variable

numeric variable name; returns the return code of the routine call.

See Also

  • PATREP on page 1485

STATE

Finds the current operating state of DSGI

Operating States: All

Return Codes:

Syntax

CALL GASK( STATE , status );

Description

The GASK( STATE , ) routine returns the current operating state of DSGI.

Argument Definitions

status

character variable name; returns one of the following values:

  • GKCL

  • GKOP

  • SGOP

  • WSAC

  • WSOP.

See Also

  • WSACTIVE on page 1445

  • WSOPEN on page 1445

TEXALIGN

Finds the horizontal and vertical alignment of the text string

Operating States: GKOP, SGOP, WSAC, WSOP

Return Codes: 0, 8

Syntax

CALL GASK( TEXALIGN , halign, valign, return-code-variable );

Description

The GASK( TEXALIGN , ) routine returns the current horizontal and vertical text alignment. If no values have been previously selected with the GSET( TEXALIGN , ) function, GASK( TEXALIGN , ) returns the default value NORMAL for both halign and valign .

Argument Definitions

halign

character variable name; indicates the horizontal alignment set by the GSET( TEXALIGN , ) function; returns one of the following values:

  • CENTER

  • LEFT

  • NORMAL

  • RIGHT.

valign

character variable name; indicates the vertical alignment set by the GSET( TEXALIGN , ) function; returns one of the following values:

  • BASE

  • BOTTOM

  • HALF

  • NORMAL

  • TOP.

return-code-variable

numeric variable name; returns the return code of the routine call.

See Also

  • TEXPATH on page 1436

  • TEXUP on page 1438

  • TEXALIGN on page 1486

TEXCOLOR

Finds the color index of the color currently selected to draw text strings

Operating States: GKOP, SGOP, WSAC, WSOP

Return Codes: 0, 8

Syntax

CALL GASK( TEXCOLOR , color-index, return-code-variable );

Description

The GASK( TEXCOLOR , ) routine returns the current text color. If a GSET( TEXCOLOR , ) function has not been previously submitted, GASK( TEXCOLOR , ) returns the default value, 1. The color index returned corresponds to a color specification in the following order:

  1. the color specified in a GSET( COLREP , ) function

  2. the n th color in the colors list of the COLORS= graphics option

  3. the n th color in the device s default colors list.

Argument Definitions

color-index

numeric variable name; returns the color index of the color used to draw text.

return-code-variable

numeric variable name; returns the return code of the routine call.

See Also

  • COLORS= graphics option (see COLORS on page 272)

  • COLREP on page 1410

  • COLREP on page 1467

  • TEXCOLOR on page 1488

TEXEXTENT

Finds the text extent rectangle and concatenation point for a specified text string

Operating States: SGOP, WSAC, WSOP

Return Codes: 0, 8

Syntax

CALL GASK ( TEXEXTENT , x, y, string, x-end, y-end, x1, x2, x3, x4, y1, y2, y3, y4, return-code-variable );

Description

The GASK( TEXEXTENT , ) routine returns the text extent rectangle and text concatenation point for a specified text string. All text extent coordinates returned are in units of the current window system. If no text string is specified for string , GASK( TEXEXTENT , ) does not return values for the other arguments.

The text attributes and bundles affect the values returned by this query. See Figure 50.1 on page 1433 for a diagram of the text extent rectangle (in the figure, x,y is always the place where the text string starts).

click to expand
Figure 50.1: Text Extent Diagram

Argument Definitions

x

numeric variable name; x coordinates are in units based on the current window system; returns x coordinate after justification. The variable used to specify x must be initialized.

y

numeric variable name; y coordinates are in units based on the current window system; returns y coordinate after justification. The variable used to specify y must be initialized.

string

character string enclosed in single quotation marks or a character variable name; a set of characters for which the text extent rectangle and text concatenation point are calculated.

x-end

numeric variable name; returns the x coordinate of the point at which the next text string may be concatenated .

y-end

numeric variable name; returns the y coordinate of the point at which the next text string may be concatenated.

x1 , x2 , x3 , x4 , y1 , y2 , y3 , y4

numeric variable names; return the text extent rectangles of the text strings as shown in Figure 50.1 on page 1433.

return-code-variable

numeric variable name; returns the return code of the routine call.

See Also

  • WINDOW on page 1444

  • TEXT on page 1456

TEXFONT

Finds the font used to draw text strings

Operating States: GKOP, SGOP, WSAC, WSOP

Return Codes: 0, 8

Syntax

CALL GASK( TEXFONT , font, return-code-variable );

Description

The GASK( TEXFONT ) routine returns the current text font. GASK( TEXFONT , ) searches for the current font in the following order:

  1. the value selected in the GSET( TEXFONT , ) function, if specified

  2. the value of the FTEXT= graphics option, if specified

  3. the device s default hardware font if the device supports a hardware font

  4. the SIMULATE font.

Argument Definitions

font

character variable name; returns the font name.

return-code-variable

numeric variable name; returns the return code of the routine call.

See Also

  • FTEXT= graphics options in (see FTEXT on page 294)

  • TEXFONT on page 1489

TEXHEIGHT

Finds the character height of the text strings

Operating States: GKOP, SGOP, WSAC, WSOP

Return Codes: 0, 8

Syntax

CALL GASK( TEXHEIGHT , height, return-code-variable );

Description

The GASK( TEXHEIGHT , ) routine returns the current text height. GASK( TEXHEIGHT , ) searches for the current text height in the following order:

  1. the value selected in the GSET( TEXHEIGHT , ) function, if specified

  2. the value of the HTEXT= graphics option, if specified

  3. the default text height, 1.

Argument Definitions

height

numeric variable name; returns the character height in units of the current window system.

return-code-variable

numeric variable name; returns the return code of the routine call.

See Also

  • TEXHEIGHT on page 1490

  • HTEXT= graphics options (see HTEXT on page 316)

TEXINDEX

Finds the index of the bundle of text attributes currently selected

Operating States: GKOP, SGOP, WSAC, WSOP

Return Codes: 0, 8

Syntax

CALL GASK( TEXINDEX , index, return-code-variable );

Description

The GASK( TEXINDEX , ) routine returns the current text bundle. If no text bundles have been previously defined with GSET( TEXREP , ) or activated with GSET( TEXINDEX , ), GASK( TEXINDEX , ) returns the default value, 1.

Argument Definitions

index

numeric variable name; returns the text bundle index.

return-code-variable

numeric variable name; returns the return code of the routine call.

See Also

  • TEXREP on page 1437

  • TEXREP on page 1492

  • TEXINDEX on page 1490

TEXPATH

Finds the direction of the text string

Operating States: GKOP, SGOP, WSAC, WSOP

Return Codes: 0, 8

Syntax

CALL GASK( TEXPATH , path , return-code-variable );

Description

The GASK( TEXPATH , ) routine returns the current text path (reading direction). If TEXPATH has not been previously selected with the GSET( TEXPATH , ) function, GASK( TEXPATH , ) returns the default value, RIGHT. See the TEXPATH on page 1491 for an illustration of text paths.

Argument Definitions

path

character variable name; returns one of the following values:

  • DOWN

  • LEFT

  • RIGHT

  • UP.

return-code-variable

numeric variable name; returns the return code of the routine call.

See Also

  • TEXALIGN on page 1430

  • TEXUP on page 1438

  • TEXPATH on page 1491

TEXREP

Finds the attribute settings associated with a text bundle

Operating States: GKOP, SGOP, WSAC, WSOP

Return Codes: 0, 8, 68, 69

Syntax

CALL GASK( TEXREP , index, color-index, font, return-code-variable );

Description

The GASK( TEXREP , ) routine returns the color and font associated with a specific text bundle. If the bundle indicated by index has not been previously defined with the GSET( TEXREP , ) function, DSGI issues the following error message:

 ERROR: A representation for the specified text index has  not been defined on this workstation. 

Argument Definitions

index

numeric constant or numeric variable name; indicates the fill bundle to check. Valid values are 1 to 20, inclusive. If index is expressed as a variable, the variable must be initialized to a value between 1 and 20.

color-index

numeric variable name; returns the color index of the fill color associated with the bundle. The color index that is returned corresponds to a color specification in the following order:

  1. a color index assigned with the GSET( COLREP , ) function

  2. the n th color in the colors list of the COLORS= graphics option

  3. the n th color in the device s default colors list.

font

character variable name; returns the text font associated with the bundle.

return-code-variable

numeric variable name; returns the return code of the routine call.

See Also

  • COLORS= graphics option (see COLORS on page 272)

  • COLREP on page 1410

  • COLREP on page 1467

  • TEXREP on page 1492

TEXUP

Finds the orientation (angle) of the text string

Operating States: GKOP, SGOP, WSAC, WSOP

Return Codes: 0, 8

Syntax

CALL GASK( TEXUP , up-x, up-y, return-code-variable );

Description

The GASK( TEXUP , ) routine returns the character up vector values. If TEXUP has not been previously selected with the GSET( TEXUP , ) function, GASK( TEXUP , ) returns the default values for x and y , 0 and 1. See the TEXUP on page 1493 for an explanation of the vector values.

Argument Definitions

up-x

numeric variable name; returns the x component of the vector.

up-y

numeric variable name; returns the y component of the vector.

return-code-variable

numeric variable name; returns the return code of the routine call.

See Also

  • TEXALIGN on page 1430

  • TEXPATH on page 1436

  • TEXUP on page 1493

TRANS

Finds the viewport and window coordinates associated with a transformation number

Operating States: GKOP, SGOP, WSAC, WSOP

Return Codes: 0, 8, 50

Syntax

CALL GASK ( TRANS , n, vllx, vlly, vurx, vury, wllx, wlly, wurx, wury, return-code-variable );

Description

The GASK( TRANS , ) routine returns the viewport and window coordinates associated with a particular transformation number. GASK( TRANS , ) returns the default coordinates for viewports and windows if other coordinates have not been defined for the transformation specified.

Argument Definitions

n

numeric constant or numeric variable name; indicates the number of the transformation to check. Valid values are 0 to 20, inclusive. If n is expressed as a variable, the variable must be initialized to a value between 0 and 20.

vllx

numeric variable name; returns the x coordinate of the lower-left viewport corner.

vlly

numeric variable name; returns the y coordinate of the lower-left viewport corner.

vurx

numeric variable name; returns the x coordinate of the upper-right viewport corner.

vury

numeric variable name; returns the y coordinate of the upper-right viewport corner.

wllx

numeric variable name; returns the x coordinate of the lower-left window corner.

wlly

numeric variable name; returns the y coordinate of the lower-left window corner.

wurx

numeric variable name; returns the x coordinate of the upper-right window corner.

wury

numeric variable name; returns the y coordinate of the upper-right window corner.

return-code-variable

numeric variable name; returns the return code of the routine call.

See Also

  • TRANSNO on page 1440

  • VIEWPORT on page 1441

  • WINDOW on page 1444

  • TRANSNO on page 1496

  • VIEWPORT on page 1497

  • WINDOW on page 1500

TRANSNO

Finds the number of the transformation to be used

Operating States: GKOP, SGOP, WSAC, WSOP

Return Codes: 0, 8

Syntax

CALL GASK( TRANSNO , n, return-code-variable );

Description

The GASK( TRANSNO , ) routine returns the current transformation. If a transformation has not been previously selected with the GSET( TRANSNO , ) function, GASK( TRANSNO , ) returns the number of the default transformation, 0.

Argument Definitions

n

numeric variable name; returns the number of the current transformation.

return-code-variable

numeric variable name; returns the return code of the routine call.

See Also

  • TRANS on page 1439

  • VIEWPORT on page 1441

  • WINDOW on page 1444

  • VIEWPORT on page 1497

  • WINDOW on page 1500

  • TRANSNO on page 1496

VIEWPORT

Finds coordinates of the viewport associated with a transformation number

Operating States: GKOP, SGOP, WSAC, WSOP

Return Codes: 0, 8, 50

Syntax

CALL GASK( VIEWPORT , n, llx, lly, urx, ury, return-code-variable );

Description

The GASK( VIEWPORT , ) routine returns the coordinates of the viewport associated with the specified transformation. If a viewport has not been defined with the GSET( VIEWPORT , ) function for the specified transformation, n , GASK( VIEWPORT , ) returns the default coordinates for the viewport, (0, 0) and (1, 1).

Argument Definitions

n

numeric constant or numeric variable name; indicates the transformation number assigned to the viewport to check. Valid values are 0 to 20, inclusive. If n is expressed as a variable, the variable must be initialized to a value between 0 and 20.

llx

numeric variable name; returns the x coordinate of the lower-left corner.

lly

numeric variable name; returns the y coordinate of the lower-left corner.

urx

numeric variable name; returns the x coordinate of the upper-right corner.

ury

numeric variable name; returns the y coordinate of the upper-right corner.

return-code-variable

numeric variable name; returns the return code of the routine call.

See Also

  • TRANS on page 1439

  • TRANSNO on page 1440

  • WINDOW on page 1444

  • TRANSNO on page 1496

  • VIEWPORT on page 1497

  • WINDOW on page 1500

VPOS

Finds the number of rows

Operating States: All

Return Codes:

Syntax

CALL GASK( VPOS , vpos, return-code-variable );

Description

The GASK( VPOS , ) routine returns the current number of rows in the graphics output area. GASK( VPOS , ) searches for the current number of rows in the following order:

  1. the value selected in the GSET( VPOS , ) function

  2. the value of the VPOS= graphics option

  3. the device s default VPOS value found in the device entry.

Argument Definitions

vpos

numeric variable name; returns the number of rows in the graphics output area.

return-code-variable

numeric variable name; returns the return code of the routine call.

See Also

  • HPOS on page 1417

  • VSIZE on page 1443

  • VPOS on page 1498

  • VPOS= graphics option (see VPOS on page 360)

VSIZE

Finds the vertical dimension of the graphics output area

Operating States: All

Return Codes:

Syntax

CALL GASK( VSIZE , vsize, return-code-variable );

Description

The GASK( VSIZE , ) routine returns the current vertical dimension, in inches, of the graphics output area. GASK( VSIZE , ) searches for the current vertical dimension in the following order:

  1. the value selected in the GSET( VSIZE , ) function

  2. the value of the VSIZE= graphics option

  3. the device s default VSIZE found in the device entry.

Argument Definitions

vsize

numeric variable name; returns the size of the graphics output area in the y dimension (in inches).

return-code-variable

numeric variable name; returns the return code of the routine call.

See Also

  • HSIZE on page 1418

  • VPOS on page 1442

  • VSIZE on page 1499

  • VSIZE= graphics option (see VSIZE on page 361)

WINDOW

Finds the coordinates of the window associated with a transformation number

Operating States: GKOP, SGOP, WSAC, WSOP

Return Codes: 0, 8, 50

Syntax

CALL GASK( WINDOW , n, llx, lly, urx, ury, return-code-variable );

Description

The GASK( WINDOW , ) routine returns the coordinates of the window associated with the specified transformation number. If no window has been defined with the GSET( WINDOW , ) function for transformation n , GASK( WINDOW , ) returns the default window coordinates, which are device dependent.

Argument Definitions

n

numeric constant or numeric variable name; indicates the transformation number of the window to check. Valid values are 0 to 20, inclusive. If n is expressed as a variable, the variable must be initialized to a value between 0 and 20.

llx

numeric variable name; returns the x coordinate of the lower-left corner.

lly

numeric variable name; returns the y coordinate of the lower-left corner.

urx

numeric variable name; returns the x coordinate of the upper-right corner.

ury

numeric variable name; returns the y coordinate of the upper-right corner.

return-code-variable

numeric variable name; returns the return code of the routine call.

See Also

  • TRANS on page 1439

  • TRANSNO on page 1440

  • VIEWPORT on page 1441

  • TRANSNO on page 1496

  • VIEWPORT on page 1497

  • WINDOW on page 1500

WSACTIVE

Finds whether the interface is active

Operating States: All

Return Codes: 29, 30

Syntax

CALL GASK( WSACTIVE , status );

Description

The GASK( WSACTIVE , ) routine asks if the workstation is active. When the workstation is active, you can execute certain DSGI routines and functions.

Argument Definitions

status

numeric variable name; returns either 29 (active) or 30 (inactive).

See Also

  • STATE on page 1430

  • WSOPEN on page 1445

WSOPEN

Finds whether the interface is open

Operating States: All

Return Codes: 24, 25

Syntax

CALL GASK( WSOPEN , status );

Description

The GASK( WSOPEN , ) routine asks if the workstation is open. If a workstation is open, the graphics catalog can be accessed.

Argument Definitions

status

numeric variable name; returns either 24 (open) or 25 (closed).

See Also

  • WSACTIVE on page 1445




SAS.GRAPH 9.1 Reference, Volumes I and II
SAS.GRAPH 9.1 Reference, Volumes I and II
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 342

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net