Hello,
this is a simple programming task (sounds like homework).
- UpdateData the contents of the richeditcontrol to a string variable of the control
- extract all lines to an integer (x,y)-array (e.g. while-loop, ipos=find(","), v.x=atoi(left(ipos), v.y=atoi(mid(ipos+1), append v to array a)
- sort array as desired
- generate string of array (e.g. for-loop, sz+=tostring(a[i].x) + "," + tostring(a[i].y) + "\r\n" )
- output this string to the richeditcontrol
When you have problems with your code, you can ask (show the code that makes problems) and we will try to help you.
Regards, Guido