Jump to content

Ed Minchau

  • Posts

  • Joined

  • Last visited

  • Days Won


Community Answers

  1. Ed Minchau's post in PETSCII UI and INPUT statement problem was marked as the answer   
    You want to make the last valid non-whitespace character position within the string the length of the string. Set a variable (let's call it Q) to the LEN of the string. Then use a loop from LEN to 1  and MID$ to look at each character in the string. If it is a space or outside the range of your allowable characters (outside the range $21..$5F, for instance) then set your Q to your loop index minus 1. When you do encounter a character within the allowable range, you can extend the allowable range to $20..$5F and thus allow spaces within the text. Once the loop is done, string = LEFT(string,Q)
  • Create New...

Important Information

Please review our Terms of Use