>>thank you Tore an Naomi
>>
>>I no longer use & since yesterday, because I was told to use () instead
>>
>>I just wanted to now whether VFP waits until a method finshes to execute completly
>>
>>to execute the next line
>>
>>I think the answers was yes, I am right ?
>
>VFP will always complete a procedure before it executes the next line. But I have seen cases where VFP does not release all resources as quick as you expect, making it necessary to add a small delay, like INKEY(0.2), to get things to work fine.
Also, in some cases, it may delegate the task to the OS (specially when dealing with files) and will resume operation as soon as the OS says "done"... even though the OS may actually queue the task, and do it a second later.
In this case, printing... I don't know whether rawprint communicates with the printer directly or just stuffs the file as is into the queue, bypassing the driver but not the spooler. In that case, the OS is probably saying "done" but that would mean "acknowledged that this file needs to be printed" - doesn't mean it will be printed immediately. It usually never is; the OS first needs to remember where it left the printer, whether the printer is still there, is it still responding, does it have paper, does it need to p... align cartridges or whatever. All of that will be done eventually, but meanwhile VFP has got control.
I guess the file may be deleted before it was printed. Maybe Moises should just store the filename somewhere in a collection and delete the stored files on shutdown.