How to use CREATETEMPFILE ?

Has anybody used CREATETEMPFILE succesfully ? The helpfile gives this example but i think it is wrong: FileName.CREATETEMPFILE: Message('Hello'); FileName.CLOSE; It must be FileName.WRITE(‘Hello’);, or ? My other problem is that when i generate a tempfile with CREATETEMPFILE and search for it with the name given by File.NAME i don’t find it. I tested it with this code: f.CREATETEMPFILE; MESSAGE(f.NAME); //at this point i searched for the file with the given name f.CLOSE; Any ideas ?

The help for CREATETEMPFILE states “… and then deletes the file with the File.CLOSE function.” I’ve used this to create the temp file, capture the name of the temp file (File.NAME), close the temp file (which deletes it), and then create a file (File.CREATE) with the name captured earlier.

MESSAGE doesn’t stop execution of code - the messages will simply be displayed after execution of code has finished; use CONFIRM instead.