NOTICE: Our Community is moving. Get more information. Updated information on a New Login Process
You may have different functions and wish to write their results to the same output file. This can be done by opening the output file in the FM_APPEND mode. FM_APPEND opens the file for appending. If the file does not exist, it is created. If the file does exist, the file pointer is positioned at the last line of the file where new information is then added to the end.
[-] PrintLine ()//name of function [ ] HFILE FileHandle [ ] STRING sVariable = "Karen Davis" [ ] STRING sFile = "output.txt"//writing to output file [ ] [ ] FileHandle = FileOpen (sFile, FM_APPEND)//FM Append instead of FM WRITE [ ] FileWriteLine (FileHandle, sVariable)//this is writing to the file [ ] [ ] FileClose (FileHandle) [ ] [-] testcase Example () appstate none//testcase calling the function [ ] PrintLine ()