ArborX


measure

Longname: measure   Open the Documentation Legend
Released: 7.80 
Created: 7.80 
See also: var attr stream mini getvar indirect (n/a) expr show xpath attrloop tokloop xpointer fs fish fishloop prop propval length lookup resolve string perl lump_expand hash taginfo format_num format_seq css char Technote: 0080

Summary
A keyword used with function variables: ^[funcname parameter(s)]. This syntax can be used anywhere that a regular 3B2 variable can be used: in show strings, in scripts, in expressions, etc. Function variables are a V8 feature that uniforms variable use and functions into a readable syntax. The 'measure' function converts the given measure into 3B2's own internal unit of measure 'deci microns', generaly used to subsequently perform some other action on the value.
Example extract

The following show string will display the current value of the th command (text height).

 <?show ^[prop th]?>

Syntax (7.80)
measure value:um
value:um

Any valid numeric measure followed my the unit.

Covert 12pt using the function variable method.

 <?show $^[measure 12pt]>

Covert 12pt using the traditional showstring syntax method.

 <?show ^#'12pt'>

The 'expr' function used with the 'measure' function to convert the pt value to mm using the baseline value to 3B2's internal 'deci micron' unit of measure then dividing that by 10000 to get the mm value.

 <?show "^BaseLine"$^[measure 28pt]> 7
 <?show $^[expr ^(^BaseLine/10000)]mm> 9

Document created on 11-Nov-2004 (revision 1)