Re: Using insert()

new topic     » goto parent     » topic index » view thread      » older message » newer message

Thanks, Tom and Chris. The problem was solved by simply changing the word 'insert' to the word 'splice' with no change to the parameters. Some day I would like to understand the principles involved; a string is a sequence except when it isn't a sequence. One cannot insert a sequence into a string, but can splice a sequence into a string. I don't doubt that there is a sound logic, but is isn't obvious to me.

It is immaterial, but the purpose of this particular function is maintenance and modification of a binary tree consisting of 32,767 elements of 12 characters each (file size 393,216). The function in question is extracting a subtree from the 32,767-element binary tree when it is discovered that the subtree is in the wrong place. It can then be re-inserted (using the subtree file just created) into a more proper location in the main tree file. Since the first parameter of both 'insert' and 'splice' is the target string, I was inserting the selected twelve-character element into the string, "UCT.dat' at position 4, not the other way around. The result is 'UCT(twelve chars).dat'. It works beautifully!

Thanks again for all of the wonderful help. Euphoria Rocks!
And so do the folks in its forum!
Allen

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu