Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Language Reference

GSTRLEN Call

finds the string length

CALL GSTRLEN( length, text<, height><, font><, window>);

The inputs to the GSTRLEN subroutine are as follows:
length
is a matrix of lengths specified in world coordinates.

text
is a matrix of text strings.

height
is a numeric matrix or literal specifying the character height.

font
is a character matrix or quoted literal that specifies a valid font name.

window
is a numeric matrix or literal specifying a window. This is given in world coordinates and has the form

 {minimum-x minimum-y maximum-x maximum-y}
The GSTRLEN subroutine returns in world coordinates the graphics text lengths in a given font and for a given character height. The length argument is the returned matrix. It has the same shape as the matrix text. Thus, if text is an n ×m matrix of text strings, then length will be an n ×m matrix of lengths in world coordinates. If you do not specify font, the default font is assumed. If you do not specify height, the default height is assumed. An example using the GSTRLEN subroutine follows:
       /* centers text strings about coordinate      */
       /* points (50, 90) assume font=simplex        */
    ht=2;
    x=30;
    y=90;
    str='Nonparametric Cluster Analysis';
    call gstrlen(len, str, ht, 'simplex');
    call gscript(x-(len/2), y, str, ,,ht,'simplex');

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.