danners430
Member
Afternoon folks, bit of a different conundrum today...
I'm trying to work out the best / easiest / most efficient way to build a "condition list" in PBasic...
My use-case is interlocking for a model railway, with the sequence of events happening as follows:
For the command to be "accepted", all the conditions would have to be true.
Bearing in mind that each possible command would have different conditions, what would be the best way to implement this in code?
The most simple method would obviously be to have an if-AND-then statement, but that's ridiculously time-consuming... surely there's a better way?
cheers
I'm trying to work out the best / easiest / most efficient way to build a "condition list" in PBasic...
My use-case is interlocking for a model railway, with the sequence of events happening as follows:
- "requested" command received (eg. set route 1)
- conditions tested
- command accepted or rejected
For the command to be "accepted", all the conditions would have to be true.
Bearing in mind that each possible command would have different conditions, what would be the best way to implement this in code?
The most simple method would obviously be to have an if-AND-then statement, but that's ridiculously time-consuming... surely there's a better way?
cheers