Entry Format
Specify a syntax string to define the entry format of the data entered into the field at run time.
ENT(
SyntaxString)
Example: ENT(~@*)
Description
Uniface compares the format of the data in the field with the pattern specified in the syntax string. If the data does not match the specified pattern when the user leaves the field, Uniface returns an error and the user is prevented from leaving the field.
Syntax Codes
Syntax code | Explanation |
---|---|
#
|
One digit (0-9) |
#*
|
0-n digits |
&
|
One letter (A-Z, a-z) |
&*
|
0-n letters |
@
|
One letter, digit, or underscore (_) |
@*
|
0-n letters, digits, or underscores |
Extended Characters. These are determined by the value of the $EXTENDED_SYNTAX assignment setting. Default is the full Unicode character set. For more information, see $EXTENDED_SYNTAX. |
|
~&
|
One extended letter. |
~&*
|
0-n extended letters |
~@
|
One extended letter, digit, or underscore (_) |
~@*
|
0-n characters, extended letters, digits, or underscores |
ASCII Characters |
|
?
|
One ASCII character |
?*
|
0-n ASCII characters |
A through Z |
That letter, in uppercase |
|
That letter, in uppercase or lowercase |
x |
The
ASCII character x, except
the syntax codes (# , * , & , @ , ~ , ? , ( , ) , % , and ^ )
|
% x
|
The ASCII character x, with no special meaning |
( any)
|
The syntax string (variable or constant) contained in parentheses is optional. A syntax check is done only if data is present. |
%%^ |
Carriage return or line feed.
Note: This code is allowed only to define entry formats in a field's syntax definition. It is not used in Proc pattern matching. |
Applies To
Examples
Entry format |
Allowed |
Not allowed |
---|---|---|
|
[nothing]
|
|
|
Any text with an asterisk
( |
Text without an asterisk as the last character. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Anything else |
|
|
Anything else |