JdV Active Member Licensed User Longtime User Mar 28, 2019 #1 Hello I don't know if this is a bug or intentional but consider the following code: Code: Dim MyString As String MyString = "Hello world" MyString.Replace("world", "everyone") Log(MyString) MyString = MyString.Replace("world", "everyone") Log(MyString) I'm assuming the line to replace "world" with "everyone" (line 3) is ignored as the first Log(MyString) outputs "Hello world". The rest of the code behaves as expected so the second Log(MyString) outputs "Hello everyone". Should the incorrect use of MyString.Replace on line 3 at least cause a warning or an error to appear in the logs? Regards Joe
Hello I don't know if this is a bug or intentional but consider the following code: Code: Dim MyString As String MyString = "Hello world" MyString.Replace("world", "everyone") Log(MyString) MyString = MyString.Replace("world", "everyone") Log(MyString) I'm assuming the line to replace "world" with "everyone" (line 3) is ignored as the first Log(MyString) outputs "Hello world". The rest of the code behaves as expected so the second Log(MyString) outputs "Hello everyone". Should the incorrect use of MyString.Replace on line 3 at least cause a warning or an error to appear in the logs? Regards Joe
Peter Simpson Expert Licensed User Longtime User Mar 28, 2019 #2 You are not doing anything with the 3rd line, so nothing will actually change...
mangojack Expert Licensed User Longtime User Mar 28, 2019 #3 Peter Simpson said: You are not doing anything with the 3rd line, so nothing will actually change... Click to expand... Op is asking ... Should the incorrect use of MyString.Replace on line 3 at least cause a warning or an error to appear in the logs? Click to expand...
Peter Simpson said: You are not doing anything with the 3rd line, so nothing will actually change... Click to expand... Op is asking ... Should the incorrect use of MyString.Replace on line 3 at least cause a warning or an error to appear in the logs? Click to expand...
Erel B4X founder Staff member Licensed User Longtime User Mar 29, 2019 #4 This is not a bug. There is no such warning in the IDE. You can make a new "wish" thread.
JdV Active Member Licensed User Longtime User Mar 29, 2019 #5 Thanks, that's the answer I was looking for. I'll create a wish.