I absolutely agree, that the values out of the borders result in NULL strings - or (even better?) return the separator string!Trond wrote:What do you mean? Its legal input remains the same. Only it fails more gracefully.Michael Vogel wrote:I'm not sure if I will like to see differences in program execution between debugger mode and non debugging mode![]()
This won't make debugging easier, what do you think?
In my opinion, it should be legal to use out-of-bounds fields, and these should return null strings. This way the command is more forgiving, and in some situations it may be useful.
But don't allow to get different return values depending if debugging is on or not (that is what I expect when reading freds posting) - maybe other functions will follow?
Trouble shooting wouldn't be as before, you won't be sure if everything if your resulting exe will work fine even if everything works as expected in debugging mode.
Just a (n absolute simple) example, but - as I understood it - you could get two different results here...
Code: Select all
If Len(StringField("mode on|mode off",mode,"|"))=0
MessageRequester("Mode no set","");"Result = '"+StringField("mode on|mode off",mode,"|")+"'")
Else
MessageRequester("Everythings fine","Result = '"+StringField("mode on|mode off",mode,"|")+"'")
EndIf