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 >
Wrap
Text File
|
1991-09-11
|
1KB
|
67 lines
PRODUCT : PARADOX NUMBER : 528
VERSION : ALL
OS : DOS
DATE : September 11, 1991 PAGE : 1/1
TITLE : SCRIPT TO CONVERT A SINGLE NAME FIELD
INTO MULTIPLE FIELDS
This script will convert a Name field into four possible fields
(title, first, initial, and last). The Name field can contain
the following data:
Title First Initial Last
or
Title First Last
or
Title Last
The script illustrates the use of the PAL commands SCAN & SWITCH
and the PAL MATCH function.
The following is the Script:
EDIT "NAME" ; Edit a Table called NAME.
SCAN
; Now, MATCH a field named Full Name for the following scenarios.
x=MATCH([Full name], ".. .. .. ..", m, f, i, l)
y=MATCH([Full name], ".. .. ..", m1, f1, l1)
z=MATCH([Full name], ".. ..", m2, l2)
SWITCH
CASE x : [First]=f
[Initial]=i
[Last]=l
[Title]=m
CASE y : [First]=f1
[Last]=l1
[Title]=m1
CASE z : [Last]=l2
[Title]=m2
ENDSWITCH
ENDSCAN