I attached a very simple example of what I am trying to do.
I am trying to write a program which generates logic statements.
But, after several hours, I have had no progress.
Maybe someone can help?
Thanks,
David
Program generated logic statements? - Solved
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Program generated logic statements? - Solved
- Attachments
-
- Test_1ZA.livecode.zip
- (1.53 KiB) Downloaded 207 times
Last edited by DR White on Sun Jul 19, 2020 10:53 pm, edited 1 time in total.
Re: Program generated logic statements?
Hi David,
I tried this with merge. Maybe that works for you. And maybe there are easier ways of doing this.
(I moved the scriptLocal variable into the handler for testing reasons so I have no remnants from previous runs)
Kind regards
Bernd
I tried this with merge. Maybe that works for you. And maybe there are easier ways of doing this.
(I moved the scriptLocal variable into the handler for testing reasons so I have no remnants from previous runs)
Code: Select all
on mouseDown pButtonNumber
local MasterLogic, MasterLogicTest
put ("[[" & "i41_00" & "]]" & " and " & "[[" & "i51_01" & "]]") into MasterLogic
put "true" into i41_00
put "false" into i51_01
put merge(MasterLogic)into MasterLogicTest
-- test MasterLogic for a true ststement, as varables i41_00 and i51_01 change
-- But, the contents of MasterLogic which is ("i41_00" & " and " & "i51_01") must not change
put the value of MasterLogicTest into temp -- temp contains logical value
--- just a stop point to check value of MasterLogicTest
put 1 into x
end mouseDown
Bernd
Re: Program generated logic statements?
Bernd,
That works GREAT!!
I thought there was a function like "merge", but I did not know the name of the function and could not find that type of function in the dictionary.
The LC forum is the BEST,
David
That works GREAT!!
I thought there was a function like "merge", but I did not know the name of the function and could not find that type of function in the dictionary.
The LC forum is the BEST,
David
Re: Program generated logic statements? - Solved
Thanks David,
I just simplified "MasterLogic". I don't use merge often and I made it too complicated.
Works just as well and is a lot easier.
Kind regards
Bernd
I just simplified "MasterLogic". I don't use merge often and I made it too complicated.
Code: Select all
put "[[i41_00]] and [[i51_01]]" into Masterlogic
Kind regards
Bernd