Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
C++ 2 QM
#3
Result of using ChatGPT conversion:  It's all wrong Wink

#1
Code:
Copy      Help
int pos = SendEditor(SCI_GETCURRENTPOS);
int nPrevLinePos = SendEditor(SCI_POSITIONFROMLINE, line-1);
int c = ' ';
for (int p = pos - 2; p >= nPrevLinePos && isspace(c); p--) {
    c = SendEditor(SCI_GETCHARAT, p);
}

#2
Code:
Copy      Help
str space="";
for (int i=0; i<nIndent; i++) {
    space+=" ";
}
SendMessage(sci, SCI_REPLACESEL, 0, &space);


Messages In This Thread
C++ 2 QM - by Davider - 04-03-2023, 10:15 AM
RE: C++ 2 QM - by Davider - 04-04-2023, 09:50 PM
RE: C++ 2 QM - by Davider - 04-08-2023, 01:24 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)