ArborX


expr

Longname: expr ession   Open the Documentation Legend
Released: 7.80 
Created: 7.80 
See also: var attr stream mini getvar show xpath length string perl hash 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 'expr' function can be used as a generic syntax to evaluate and standard showstring expression.
Example extract

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

 <?show ^[prop th]?>

Syntax (7.80)
expression:t

Any valid showstring expression. See also Showstring Reference

An expression example.

 <?show $^[expr 1+2-a+b]>

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]> 5
 <?show $^[expr ^(^BaseLine/10000)]mm> 7

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