1ckint(1) User Commands ckint(1)
2
3
4
6 ckint, errint, helpint, valint - display a prompt; verify and return an
7 integer value
8
10 ckint [-Q] [-W width] [-b base] [-d default] [-h help]
11 [-e error] [-p prompt] [-k pid [-s signal]]
12
13
14 /usr/sadm/bin/errint [-W width] [-b base] [-e error]
15
16
17 /usr/sadm/bin/helpint [-W width] [-b base] [-h help]
18
19
20 /usr/sadm/bin/valint [-b base] input
21
22
24 The ckint utility prompts a user, then validates the response. It
25 defines, among other things, a prompt message whose response should be
26 an integer, text for help and error messages, and a default value
27 (which will be returned if the user responds with a carriage return).
28
29
30 All messages are limited in length to 70 characters and are formatted
31 automatically. Any white space used in the definition (including new‐
32 line) is stripped. The -W option cancels the automatic formatting. When
33 a tilde is placed at the beginning or end of a message definition, the
34 default text will be inserted at that point, allowing both custom text
35 and the default text to be displayed.
36
37
38 If the prompt, help or error message is not defined, the default mes‐
39 sage (as defined under NOTES) will be displayed.
40
41
42 Three visual tool modules are linked to the ckint command. They are
43 errint (which formats and displays an error message), helpint (which
44 formats and displays a help message), and valint (which validates a
45 response). These modules should be used in conjunction with FML
46 objects. In this instance, the FML object defines the prompt. When base
47 is defined in the errint and helpint modules, the messages will include
48 the expected base of the input.
49
51 The following options are supported:
52
53 -b base Defines the base for input. Must be 2 to 36, default is
54 10.
55
56
57 -d default Defines the default value as default. The default is not
58 validated and so does not have to meet any criteria.
59
60
61 -e error Defines the error message as error.
62
63
64 -h help Defines the help messages as help.
65
66
67 -k pid Specifies that process ID pid is to be sent a signal if
68 the user chooses to abort.
69
70
71 -p prompt Defines the prompt message as prompt.
72
73
74 -Q Specifies that quit will not be allowed as a valid
75 response.
76
77
78 -s signal Specifies that the process ID pid defined with the -k
79 option is to be sent signal signal when quit is chosen.
80 If no signal is specified, SIGTERM is used.
81
82
83 -W width Specifies that prompt, help and error messages will be
84 formatted to a line length of width.
85
86
88 The following operand is supported:
89
90 input Input to be verified against base criterion.
91
92
94 The following exit values are returned:
95
96 0 Successful execution.
97
98
99 1 EOF on input, or negative width on -W option, or usage error.
100
101
102 3 User termination (quit).
103
104
106 See attributes(5) for descriptions of the following attributes:
107
108
109
110
111 ┌─────────────────────────────┬─────────────────────────────┐
112 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
113 ├─────────────────────────────┼─────────────────────────────┤
114 │Availability │SUNWcsu │
115 └─────────────────────────────┴─────────────────────────────┘
116
118 attributes(5)
119
121 The default base 10 prompt for ckint is:
122
123 Enter an integer [?,q]:
124
125
126
127
128 The default base 10 error message is:
129
130 ERROR - Please enter an integer.
131
132
133
134
135 The default base 10 help message is:
136
137 Please enter an integer.
138
139
140
141
142 The messages are changed from "integer" to "base base integer" if the
143 base is set to a number other than 10.
144
145
146 When the quit option is chosen (and allowed), q is returned along with
147 the return code 3. The valint module will not produce any output. It
148 returns 0 for success and non-zero for failure.
149
150
151
152SunOS 5.11 14 Sep 1992 ckint(1)