Hi, I just wanted to share with the pcbasic community two ways to delete a line or part of it I just used in a program of mine.
the goal is to have a subroutine you can use in multiple position around your program just passing to it two variables: Y the line you want to delete and X the point where you want to start deleting.
The only drawback is that you can delete only from a point to the end of line, not let's say ten characters at the center of a line.
this code uses a for cycle to locate a fixxed Y and a subsequent X a "space" character.
Hi, I just wanted to share with the pcbasic community two ways to delete a line or part of it I just used in a program of mine.
the goal is to have a subroutine you can use in multiple position around your program just passing to it two variables: Y the line you want to delete and X the point where you want to start deleting.
The only drawback is that you can delete only from a point to the end of line, not let's say ten characters at the center of a line.
this code uses a for cycle to locate a fixxed Y and a subsequent X a "space" character.
the second code runs much faster due to the use of STRING$ command instead of FOR cycle:
And if you want to delete more lines in a single command you could use VIEW:
this code clear all the lines starting from 10th down to 20th.