sequences, i'm confused, as usual
- Posted by Kat <KSMiTH at PELL.NET> Sep 15, 1999
- 321 views
Please? I can't figure this out,,, in the code below, in the first match() i must use {} to get it to work right, but in the 2nd match(), i don't? If i *don't* use {} in the 1st one, it fails,, if i *do* use {} in the 2nd one, it fails. I don't mean the "=" and "!=" in the following lines, i mean the match() fails. What am i not understanding now? procedure addrec(sequence rootname, sequence newrec) integer place rootname = "xx" & rootname & "xx" newrec = "xx" & newrec & "xx" trace(1) place = match({rootname},mainseq) if ( place = 0 ) then puts(1,rootname & " doesn't exist!" & "\n") return end if -- trace(1) place = match(newrec,mainseq[place]) if ( place != 0 ) then puts(1,newrec & " exists already!" & "\n") return end if end procedure -- addrec(sequence rootname, sequence newrec) Kat, confused as heck again.