home *** CD-ROM | disk | FTP | other *** search
/ Shareware 1 2 the Maxx / sw_1.zip / sw_1 / TEXT / PDX_ALL.ZIP / TI528.ASC < prev    next >
Text File  |  1991-09-11  |  1KB  |  67 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.   PRODUCT  :  PARADOX                                NUMBER  :  528
  8.   VERSION  :  ALL
  9.        OS  :  DOS
  10.      DATE  :  September 11, 1991                       PAGE  :  1/1
  11.  
  12.     TITLE  :  SCRIPT TO CONVERT A SINGLE NAME FIELD
  13.               INTO MULTIPLE FIELDS
  14.  
  15.  
  16.  
  17.  
  18.   This script will convert a Name field into four possible fields
  19.   (title, first, initial, and last).  The Name field can contain
  20.   the following data:
  21.  
  22.           Title First Initial Last
  23.                   or
  24.           Title First Last
  25.                   or
  26.           Title Last
  27.  
  28.   The script illustrates the use of the PAL commands SCAN & SWITCH
  29.   and the PAL MATCH function.
  30.  
  31.   The following is the Script:
  32.  
  33.   EDIT "NAME"             ; Edit a Table called NAME.
  34.   SCAN
  35.  
  36.   ; Now, MATCH a field named Full Name for the following scenarios.
  37.   x=MATCH([Full name], ".. .. .. ..", m, f, i, l)
  38.   y=MATCH([Full name], ".. .. ..", m1, f1, l1)
  39.   z=MATCH([Full name], ".. ..", m2, l2)
  40.  
  41.   SWITCH
  42.  
  43.   CASE x : [First]=f
  44.            [Initial]=i
  45.            [Last]=l
  46.            [Title]=m
  47.  
  48.   CASE y : [First]=f1
  49.            [Last]=l1
  50.            [Title]=m1
  51.  
  52.   CASE z : [Last]=l2
  53.            [Title]=m2
  54.  
  55.   ENDSWITCH
  56.   ENDSCAN
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.