I have a PB/CC program that I end it's process when a file exists as shown below.
DO
...
IF Exist("file.txt") THEN EXIT LOOP
LOOP
I dislike having to create "file.txt" to accomplish the termination for various reasons: I must create/delete the file or I may want to run the program in an environment that has no writeable disk.
Is there anyway to accomplish this with some kind variable that exists in memory? Am I correct in my thinking that most variables are confined to the executable in which they reside? One method that succeeded for me was to write a certain string to the Windows clipboard. The looping program reads the clipboard then exits if the string is found. This proves to me that what I want can be accomplished totally in memory without writing to a drive, but my clipboard is jeophardized for other applications. Can I do this with REGISTER variables (i.e. #REGISTER statement) or an ENVIRONMENT variable? I want to use the least amount of code as possible.
DO
...
IF Exist("file.txt") THEN EXIT LOOP
LOOP
I dislike having to create "file.txt" to accomplish the termination for various reasons: I must create/delete the file or I may want to run the program in an environment that has no writeable disk.
Is there anyway to accomplish this with some kind variable that exists in memory? Am I correct in my thinking that most variables are confined to the executable in which they reside? One method that succeeded for me was to write a certain string to the Windows clipboard. The looping program reads the clipboard then exits if the string is found. This proves to me that what I want can be accomplished totally in memory without writing to a drive, but my clipboard is jeophardized for other applications. Can I do this with REGISTER variables (i.e. #REGISTER statement) or an ENVIRONMENT variable? I want to use the least amount of code as possible.
Comment