[08 Apr 2007] Help with a logic problem
Posted: Sat Jun 13, 2020 5:31 pm
Note: This is an archived post that was originally sent to the Hollywood mailing list on 08 Apr 2007 13:49:07 +1000
Hi,
I'm having some difficulty with a logic problem. I am trying to break a While loop from a function recursion by using one of two tests.
The first test works and is returning from the function recursion but the second test which is supposed to finish the while loop on the last iteration of the function recursion always seems to fail and I get file read errors because I am reading past the end of file.. I have the exact same issue if I try to check for EOF as the second check in the while loop which is why i am testing with variables instead.
The While statement is this
To exit a normal iteration of the function linetype=3 and the while loop is finishing and the function is returning to the previous but on the last recursion of the function where I want it to exit before it reads the next line the values are:
linetype=3 and tag=1 But the While loop is coninuing??
Is my logic floored somewhere. I have tried using the binary operators | and & instead of Or and And with no success.
Ideally I would like to test for either linetype=3 or the EOF (File$) but this didn't work either..
Any help would be gratefully received.
PS. I am writing a script that will hopefully read in a Meedio configuration file and display screens based on their configuration. Meedio is a program on Windows that displays information much like Windows Media Center but is far more configurable and accessible than Windows Media Center and has hundreds of Plugins.. I don't intend on using the plugins simpy the screen layout config files so that I can present an easy to use menu system for accessing lots of different information such as a video library, music, games, weather etc..
Thought It would be cool to see a front end program to launch emulated games through Mame or UAE or even launch videos via Mplayer or DVPlayer.
Regards,
Dwayne
Hi,
I'm having some difficulty with a logic problem. I am trying to break a While loop from a function recursion by using one of two tests.
The first test works and is returning from the function recursion but the second test which is supposed to finish the while loop on the last iteration of the function recursion always seems to fail and I get file read errors because I am reading past the end of file.. I have the exact same issue if I try to check for EOF as the second check in the while loop which is why i am testing with variables instead.
The While statement is this
Code: Select all
While ((linetype <> 3) Or (((linetype=3) & (tag=1))=False))
linetype=3 and tag=1 But the While loop is coninuing??
Is my logic floored somewhere. I have tried using the binary operators | and & instead of Or and And with no success.
Ideally I would like to test for either linetype=3 or the EOF (File$) but this didn't work either..
Any help would be gratefully received.
PS. I am writing a script that will hopefully read in a Meedio configuration file and display screens based on their configuration. Meedio is a program on Windows that displays information much like Windows Media Center but is far more configurable and accessible than Windows Media Center and has hundreds of Plugins.. I don't intend on using the plugins simpy the screen layout config files so that I can present an easy to use menu system for accessing lots of different information such as a video library, music, games, weather etc..
Thought It would be cool to see a front end program to launch emulated games through Mame or UAE or even launch videos via Mplayer or DVPlayer.
Regards,
Dwayne