Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PICTURE clause on GET statement fails 1

Status
Not open for further replies.

NRGeti

Programmer
Sep 19, 2001
124
0
0
US
I need to fix a Foxpro 2.5 program. The PICTURE clause on an @GET statement is not doing what I thought it should.

I want to display a telephone number as (123)444-5555 format. If the input variable, innum='1234445555' and I use
@1,45 GET innum PICTURE '(999)999-9999' the result is

(234)455-5335

Each character in the PICTURE is replacing the corresponding position of the input string. For example, '(' replaces the '1'. Then when the PICTURE runs out of digits to replace it starts picking up some in between.

I always thought that the extra characters just got inserted into the result and did not replace a position.
 
Are you saying that innum exists with the value "1234445555" before you call the @ GET? What happens if innum is empty beforehand? You should see the (___)___-____ mask appear to accept your input.

Geoff Franklin
 
You must use the '@R (999)999-9999' picture formula.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top