steamer_ctn, on 24 May 2023 - 08:57 PM, said:
Another thought for policy/guideline is for the standard specification of data parameters.
Recently I noticed this comment in a thread. It appears to use true/false inputs rather then 0/1 inputs. This means that we will now have a mixture of both which I think is confusing. Personally I don't have a fixed leaning either way, though the 0/1 is quicker to type.
I think that we should set a standard policy/guideline about how these types of entries should be done, or alternatively make sure that the parameter accepts either of the above options.
Recently I noticed this comment in a thread. It appears to use true/false inputs rather then 0/1 inputs. This means that we will now have a mixture of both which I think is confusing. Personally I don't have a fixed leaning either way, though the 0/1 is quicker to type.
I think that we should set a standard policy/guideline about how these types of entries should be done, or alternatively make sure that the parameter accepts either of the above options.
Peter, you raise a good question - neither James nor I knew what Open Rails does without inspecting the code.
The STFReader.ReadBool() method will accept either ( FALSE ) or ( 0 ) as false and either ( TRUE ) or ( 1 ) or any non-zero integer as true. If the value is missing ( ), then the default for that parameter is returned. Entries are not case-sensitive.
The interesting point is that the Source Code Control records show that the extension to also accept ( FALSE ) and ( TRUE ) has the date Oct 2010, so it's been that way for over 12 years.So users can enter whichever notation works best for them.
Perhaps I can also say that developers should take care to use only the methods in STFReader. If you find a need to roll your own, then there is something wrong and we should have a team discussion.