mask_chk

Validates format mask.

Available in:

Apps (win) Apps (char) Reportwriter RPC Standalone PL
X X X X X

Syntax

int mask_chk(datatype,mask)
char         datatype,mask

Description

Checks if the format mask is valid for the given datatype. Returns 1 if mask is valid, else 0.
datatype can be:
  • C --- Character
  • D --- Datetime
  • I --- Integer
  • N --- Numeric

mask specifies the mask definition (see DesignVision Users Guide.)

Notes

The format mask for char is case-sensitive.

Example

Prompts the user for the format mask and validate it before using:
{
char mask[40];
mask = prompt("Please enter the format mask ==> ");
while (mask_chk(datatype(parm.0),mask) == 0)
  printf("Mask is invalid for " ^^ datatype(parm.0) ^^ " datatype.");
.
.
}