Show 

Home > Zim Language Reference > Language Reference - alphabetical > $mask

$mask

Applies a mask pattern to the specified data item.

For a more detailed explanation of mask patterns and their relation to data types, see Masking.

Syntax

$mask(item,pattern)

Parameters

item
  • A value of any type or an expression that yields a value of any type; or
  • An field of any data type.
pattern
  • The mask pattern to apply to item.
  • alphanumeric;
  • a constant, a variable, a parameter, or a field.

Return Value

Character string, containing the masked value.

Comments

Examples

list all Employees format FirstName LastName \
  ($mask(DeptNum,"?epartment Number ??"))

Displays values of DeptNum, such as "D09", as "Department Number 09", instead of "D09".

 

list all Employees format FirstName LastName \
  ($mask(Salary,"$$$$$$9.99"))

Displays all values of Salary with a floating dollar sign.

 

$mask ($date, "MM-DD-YY")

Evaluates to "08-18-98" if $Date is 19980818.

 

Related Topics