Procedure Test()
c$="﹃"
ReplaceString(a$,b$,c$,,StartPos,1)
Debug "This line identation is correct"
ReplaceString(a$,b$,"﹃",,StartPos,1)
Debug "This line identation is incorrect"
EndProcedure
The first Debug line identation is correct. When I replace C$ with the actual unicode character, the next Debug line identation changed.
IDE 5.73 LTS in win 10 pro.
Any suggestion?
Thanks
Last edited by Allen on Wed Feb 09, 2022 5:56 am, edited 1 time in total.
Procedure Test()
c$="﹃"
ReplaceString(a$,b$,c$,#PB_String_InPlace,StartPos,1)
Debug "This line identation is correct"
ReplaceString(a$,B$,"﹃",#PB_String_InPlace)
Debug "This line identation is correct"
ReplaceString(a$,B$,"﹃",#PB_String_InPlace,startpos)
Debug "This line identation is correct"
ReplaceString(a$,B$,"﹃",#PB_String_InPlace,startpos,1)
Debug "This line identation is incorrect"
EndProcedure
I'm on linux / can't reproduce, so I will just ask: How did you get that indentation? Is that the result you get with Cntrl+A Cntrl+I (select all, format indentation)?
I get the identation by just entering the text line by line. If I modify the identation manually, using CTL-A,CTL-I will restore to the original condition.
I'm not sure what you mean by 'original condition', is it right or wrong then?
What happens if you delete the line breaks and whitespaces between the lines and press Enter again? Is the result different if you use simpler characters in the string literal?
Original condition means the same condition (wrong) as I enter line by line. If I edit the line manually, (delete space before debug), it will changed back to the wrong condition after CTL-A, CTL-I.
Replace the unicode char with an normal ASCII char, the problem goes away.
1) The problem only occur if I use ONE unicode char, it goes away if I use two or more unicode char.
2) Adding ASCII char and ONE unicode char will affect the isentation of next line.
I delete the preference file and reload IDE and the test file, the problem still exist. It may be due to the character set I used, will look into it later. Anyway, it is good to confirm it is not an iDE issue and I do learn how to reset the IDE setting (delete the preference file) .