Evaluate a boolean Expression within a variable? - Solved
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Evaluate a boolean Expression within a variable? - Solved
I am unable to Evaluate a boolean Expression within a variable.
(Craig, I can't find the code tag)
My code:
The contents of the TransposeOutputlogic is:
InputTable[3] and ((InputTable[0]) or (((InputTable[0]) or (InputTable[0])))) and InputTable[1] and InputTable[2] and InputTable[4]
-------- Does Not Work ----------
Code 1
if TransposeOutputlogic = true then
answer "Yes"
end if
-------- Works ----------
Code 2
if InputTable[3] and ((InputTable[0]) or (((InputTable[0]) or (InputTable[0])))) and InputTable[1] and InputTable[2] and InputTable[4] = true then
answer "Yes"
end if
Why is the Boolean expression within my variable TransposeOutputlogic not working?
Thanks,
David
(Craig, I can't find the code tag)
My code:
The contents of the TransposeOutputlogic is:
InputTable[3] and ((InputTable[0]) or (((InputTable[0]) or (InputTable[0])))) and InputTable[1] and InputTable[2] and InputTable[4]
-------- Does Not Work ----------
Code 1
if TransposeOutputlogic = true then
answer "Yes"
end if
-------- Works ----------
Code 2
if InputTable[3] and ((InputTable[0]) or (((InputTable[0]) or (InputTable[0])))) and InputTable[1] and InputTable[2] and InputTable[4] = true then
answer "Yes"
end if
Why is the Boolean expression within my variable TransposeOutputlogic not working?
Thanks,
David
Last edited by DR White on Fri Dec 23, 2022 8:38 pm, edited 1 time in total.
Re: Evaluate a boolean Expression within a variable?
So TransposeOutputlogic contains/results in FALSE?
Re: Evaluate a boolean Expression within a variable?
I'm not Craig, but here they are:
Re: Evaluate a boolean Expression within a variable?
I finally got it.
---- Works ----
I had tried the code below but instead of "Value" I used "Val" and it gave me an error. That is when I reached out for help.
---- Does Not Work ----
Thanks for everyone's time,
David
---- Works ----
Code: Select all
if the value of TransposeOutputlogic = true then
answer "Yes"
else
answer "No"
end if
---- Does Not Work ----
Code: Select all
if the val of TransposeOutputlogic = true then
answer "Yes"
else
answer "No"
end if
Thanks for everyone's time,
David
Re: Evaluate a boolean Expression within a variable? - Solved
AHA! "value", go figure!
Thanks for the feedback!
Happy holidays from germany
Klaus

Thanks for the feedback!
Happy holidays from germany
Klaus
Re: Evaluate a boolean Expression within a variable? - Solved
From the ChatGPT AI engine at https://chat.openai.com/chat
The underlying purpose of Al is to allow wealth to access skill
while removing from the skilled the ability to access wealth.
while removing from the skilled the ability to access wealth.
Re: Evaluate a boolean Expression within a variable? - Solved
I see that you assumed "val" was a synonym for "value". We see it is not.
LC would have thrown an error, since it interpreted:
as if "val" was a custom property of "TransposeOutputlogic". But you cannot assign a custom property to a variable, only to an object.
Craig
LC would have thrown an error, since it interpreted:
Code: Select all
if the val of TransposeOutputlogic = true then
Craig