home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / database / 9368 < prev    next >
Encoding:
Text File  |  1993-01-24  |  1.8 KB  |  54 lines

  1. Newsgroups: comp.databases
  2. Path: sparky!uunet!gumby!destroyer!news.iastate.edu!ponderous.cc.iastate.edu!viking
  3. From: viking@iastate.edu (Dan Sorenson)
  4. Subject: Re: Dbase III question
  5. Message-ID: <viking.727907502@ponderous.cc.iastate.edu>
  6. Sender: news@news.iastate.edu (USENET News System)
  7. Organization: Iowa State University, Ames IA
  8. References: <19992@mindlink.bc.ca>
  9. Date: Sun, 24 Jan 1993 20:31:42 GMT
  10. Lines: 42
  11.  
  12. In <19992@mindlink.bc.ca> John_Carson@mindlink.bc.ca (John Carson) writes:
  13.  
  14. >@ 12,12 "Enter Firstname:"  get x                  PICTURE "!XXXXXXXXXXX"
  15. >@ 13,12 "Enter Lastname: "  get y                  PICTURE "!XXXXXXXXXXX"
  16.  
  17. >mname = trim(x)+" "+y
  18. >REPLACE FIRSTNAME WITH x
  19. >REPLACE LASTNAME WITH y
  20. >REPLACE FULLNAME WITH mname
  21.  
  22.     @12,10 say 'Enter Name:'
  23.     @12,20 get fullname picture '!XXXXXXXXXXXXXXXXXXXX'
  24.     read
  25.     store 1 to x
  26.     store .f. to caps
  27.     do while x<=20
  28.         store substr(fullname,x,1) to temp
  29.         if temp<>' ' .and. caps
  30.             store substr(fullname,x-1,1)+upper(temp)+;
  31.             substr(fullname,x+1) to fullname
  32.             store .f. to caps
  33.         endif
  34.         if temp=' '
  35.         store .t. to caps
  36.         endif
  37.         x=x+1
  38.     enddo
  39.     @12,20 get fullname picture 'XXXXXXXXXXXXXXXXXXXX'
  40.     read
  41.  
  42. It's a simple little loop which I've used before.  The last GET allows
  43. the user to correct any problems my routine creates, such as what might
  44. get caused by initials being entered (eg: i.m. customer = i.m. Customer),
  45. but of course such things can be used above (if temp=' ' .or. '.' .or.).
  46.  
  47. Anyway, this is a simple routine that might do what you want without
  48. having extra fields and the like introduced.
  49.  
  50. < Dan Sorenson, DoD #1066 z1dan@exnet.iastate.edu viking@iastate.edu >
  51. <  ISU only censors what I read, not what I say.  Don't blame them.  >
  52. <     USENET: Post to exotic, distant machines.  Meet exciting,      >
  53. <                 unusual people.  And flame them.                   >
  54.