I have a single giant string of HPBasic code in a text file such as:
158 ! 159 SUBEXIT 160 ! 161 Prntr_available: ! Cannot allow entry to Test Menu if printer is not 162 ! available; results only go to printer 163 IF Conditions$(15,2)[6,6]<>"*" THEN ! Printer is not available 164 Cond_error=1 165 Prompt_user("ERROR: Printer not available; cannot perform tests.")
Those consecutive numbers are new lines in the code. How can I iterate over this to print a newline before each one of those numbers to make this readable? For now I have:
mystring = ('EnormousString')
myString.replace('1', '1\n')
This kind of works. Is there a way to add +=1 to this? Not sure where to go with it.