Re: TIB: lots of help needed


[Prev][Next][Index][Thread]

Re: TIB: lots of help needed




At 12:11 AM 2/14/98 PST, you wrote:
>
>Here's a thought about your variable situation:
>
>Maybe you could also prompt to find out if the variable exists.
>You could try something like:
>
>:6->dimL list1

This looks promising, but could you explain the dimL list1 function.  I
mean exactly and very detailed, so that i might know what i'm doing in the
program.

>:Input "Do you know A?",t
>:t->exist[1]

I know you're storing the variable t into exist[1], but what is the [1] for?

>:If exist[1]

You just have If exist [1], what's the condition it's testing?

>:Input "What is it?",A
>:Input "Do you know B?",t
>:t->exist[2]
>:If exist[2]
>:Input "What is it?",B
> .
> .
> .
>:Input "Do you know c?",t
>:t->exist[6]
>:If exist[6]
>:Input "What is it?",c
>:
>
>However, I know this is unnecessarily long and can be shortened quite 
>easily, but here's the result:
>
>If you only know A, B, a, and c, list1 will be {1,1,0,1,0,1}.  In this 
>program segment, no unknown var receives a number.  You could define the 
>necessary function into that variable using the command = (not to be 
>confused with the test ==; I'm talking about the '85 here)
>
>Further shortening of this program might include using a For loop, a 
>single variable for the input, a six-character string, "ABCabc", and any 
>one of the following: two lists containing six elements, one list 
>containing all info, or a 6X2 matrix.
>
>Here's a tentative example [pardon any inaccuracies]:
>
>...
> :6 -> dimL exist
> :6 -> dimL vars
> :For(x,1,6)
>  :Input "Do you know "+sub("ABCabc",x,1)+"? ",t
>  :t -> exist[x]
>  :If exist[x]
>   :Input "What is it?",t
>  :t -> vars[x]
> :End
>...
>

This looks a little better, but i still don't understand any of it.  Please
explain step by step what you did.  Thanks!





>
>Now, in order to tell the calc you do not know the number, you could 
>either: type 0 every time it asks; store 0 to a variable called 'no' and 
>1 to 'yes', or whatever you can think of.  Note that t stores its 
>contents into the list 'vars' whether you declare it known or not.  It 
>is up to your program to test the var using the other list 'exist'.
>
>Hope this helps.
>
>Tavis
>
>
>______________________________________________________
>Get Your Private, Free Email at http://www.hotmail.com
>
>
Alex

Visit my homepage at:
http://www.fortunecity.com/skyscraper/coding/190/index.html

Or email me at:
kimo@iland.net


References: