CDS268

Enter Telephone Number

Last Revised: 11/09/08

This program can be called to prompt the user to enter telephone numbers.  It supports US AAA-EEE-NNNN format as well as unformatted foreign telephone numbers.  CDS268 uses the X-type ENTER list.

Entry Rules
1 Letters entered are converted to their equivalent number
2 Plus and period characters are converted to hyphens
3 After the above conversion, only numbers, spaces and hyphens are permitted
4 Foreign phone numbers can being with 011.  Other phone numbers that begin with zero are invalid
5 Phone numbers cannot begin with 1
6 7 digit phone numbers are formatted in EEE-NNNN format.
7 10 digit phone numbers are formatted in AAA-EEE-NNNN format.

Calling Format:

CALL "CDS268", ERR=XXXX, MINC, MAXC, COL, ROW, PROMPT$, PHLEN, PHONE$, { CTLVAL, OPT$, FMT$[ALL] }

Variable To/From Usage
ERR=XXXX   Branch to line XXXX if OPT$ includes the letter "E" which is passed to CDS069 to enabled the Ctl+C=Abort phrase in the prompt.
MINC To Minimum number of non-blank characters that can be entered.  Typically 7.
MAXC To Maximum number of characters in PHONE$.  Typically 12 for US telephone numbers, 21 or more for foreign telephone numbers.
COL To Entry column
ROW To Entry row.  COL and ROW can both be zero for entry at bottom of window.
PROMPT$ To User prompt message such as "+telephone#"
PHLEN From Returned by CDS268 as the length of the telephone#.
PHONE$ To/From Default and returned value. 
CTLVAL From Value of the CTL system variable returned to calling program.
OPT$ To Options for entry and validation.
nullAny phone# may be entered
"DIS"Display PHONE$ @(COL,ROW)
"FMT"Returns PHONE$ in FMT$[0]
Pipe separated list of phone numbersAllows selection of phone# or entry of a phone# not in the list
Complete entry type used by CDS069Example: "PEA{|,-22,|,,,Y,,"+NAME$+"}"+PHLIST$
FMT$[ALL] From FMT$[0] will be the same as PHONE$
Simple example
CALL "CDS268",0,12,0,0,"+phone#",0,PHONE$
Enter phone# ____________
Example including a list of phone numbers
CALL "CDS268",0,12,0,0,"+phone#",0,PHONE$,0,"330-374-1000|800-301-1234"
┌──────────────┐
 
330-374-1000 
│ 
800-301-1234 │
└──────────────┘

Enter phone#, or highlight selection and touch Enter ____________

Example including name in window border
1200 BEGIN
1210 LET NAME$="A & A Distributing"
1220 LET PHLIST$="330-374-1000|800-302-1234"
1230 CALL "CDS268",0,22,COL,ROW,"+telephone#",0,PHONE$,0,"L{|,-22,|,,,Y,,"+NAME$+"}"+PHLIST$
┌─A & A Distributing─────────────┐
 
330-374-1000                   
│ 
800-301-1234                   │
└────────────────────────────────┘

Enter telephone#, or highlight selection and touch Enter ______________________