Combine/split arrays

Shari gypsyware at earthlink.net
Fri Aug 29 18:06:01 EDT 2003


Still working on the array issue.  The array is multi-dimensional. 
There are always 2 numbers to get to a piece of info.  The info 
retrieved is one line of data, originally comma delimited, but now 
delimited by semi-colon, as I thought the comma was throwing off the 
combine/split functions (I sure would prefer a comma....)

eg:  myData[1,50]
eg:  myData[300,860]


# combine handler #

global myData
   put the effective filename of this stack into combineArrays
   set the itemDel to "/"
   put "combine.mc" into the last item of combineArrays
   set the itemDel to comma

   combine myData using "@" and "~"
   put myData into cd fld 1 of cd 1 of stack combineArrays
   save stack combineArrays

# split handler #

global myData
   put the effective filename of this stack into combineArrays
   set the itemDel to "/"
   put "combine.mc" into the last item of combineArrays
   set the itemDel to comma

   put cd fld 1 of cd 1 of stack combineArrays into myData

   split myData using "@" and "~"

   answer myData [1,1]  # testing the result, this one always works

   answer myData [50,860]  # testing the result, comes up empty where 
data should be

   answer myData [300,860]  # testing the result, comes up empty where 
data should be

Any ideas?

Shari C
Gypsy King Software


-- 
--Shareware Games for the Mac--
http://www.gypsyware.com



More information about the metacard mailing list