Re: Great big hole in binary..

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

On Thu, 2 Nov 2000 15:55:15 -0800, Thomas wrote:

>Anyway, I have gotten a lot of "Find 3: The Reckoning" letters back, but
>not one that answers my original question. I don't want to be rude or
>anything, but I figured through all of the replys, the original problem
>got lost. Could you please help me withn this?

Your orignal question was:

>The "location" variable only gives a correct number if "them" is used.
>Nothing else. I've looked at all the documentation I've got and either I
>am quite blind or, I just haven't found my solution. Anywho, if you could
>solve this problem, I'd be most grateful....

While I believe your question was answered at least once, let me see if I
can give you what you're really looking for (which is kinda difficult since
I don't really know what you are trying to accomplish).

So let's see what is happening:

  location = find(input[1],names[2])

OK, you are trying to find the first character of your input in names[2]

since names ={"bob","them","worms"}, that means that names[2] = "them"

'input' is a sequence which represents the string of characters entered

so say you entered "them", so

  input = { 't', 'h', 'e', 'm', 10 }  -- the 10 is from the enter key

it follows that

  input[1] = 't'

now lets fill in the blanks:

location = find( 't', "them" )
so location = 1

So my question is:  What are you trying to accomplish?  Because what I've
explained here gives you the result for the variable 'location' regardless
of what 'curname' is.

The more specific you can be, the more likely we can provide the answer you
are looking for.

-- Brian

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

Search



Quick Links

User menu

Not signed in.

Misc Menu