home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.databases
- Path: sparky!uunet!gumby!destroyer!news.iastate.edu!ponderous.cc.iastate.edu!viking
- From: viking@iastate.edu (Dan Sorenson)
- Subject: Re: Dbase III question
- Message-ID: <viking.727907502@ponderous.cc.iastate.edu>
- Sender: news@news.iastate.edu (USENET News System)
- Organization: Iowa State University, Ames IA
- References: <19992@mindlink.bc.ca>
- Date: Sun, 24 Jan 1993 20:31:42 GMT
- Lines: 42
-
- In <19992@mindlink.bc.ca> John_Carson@mindlink.bc.ca (John Carson) writes:
-
- >@ 12,12 "Enter Firstname:" get x PICTURE "!XXXXXXXXXXX"
- >@ 13,12 "Enter Lastname: " get y PICTURE "!XXXXXXXXXXX"
-
- >mname = trim(x)+" "+y
- >REPLACE FIRSTNAME WITH x
- >REPLACE LASTNAME WITH y
- >REPLACE FULLNAME WITH mname
-
- @12,10 say 'Enter Name:'
- @12,20 get fullname picture '!XXXXXXXXXXXXXXXXXXXX'
- read
- store 1 to x
- store .f. to caps
- do while x<=20
- store substr(fullname,x,1) to temp
- if temp<>' ' .and. caps
- store substr(fullname,x-1,1)+upper(temp)+;
- substr(fullname,x+1) to fullname
- store .f. to caps
- endif
- if temp=' '
- store .t. to caps
- endif
- x=x+1
- enddo
- @12,20 get fullname picture 'XXXXXXXXXXXXXXXXXXXX'
- read
-
- It's a simple little loop which I've used before. The last GET allows
- the user to correct any problems my routine creates, such as what might
- get caused by initials being entered (eg: i.m. customer = i.m. Customer),
- but of course such things can be used above (if temp=' ' .or. '.' .or.).
-
- Anyway, this is a simple routine that might do what you want without
- having extra fields and the like introduced.
-
- < Dan Sorenson, DoD #1066 z1dan@exnet.iastate.edu viking@iastate.edu >
- < ISU only censors what I read, not what I say. Don't blame them. >
- < USENET: Post to exotic, distant machines. Meet exciting, >
- < unusual people. And flame them. >
-