Adding carriage returns to text files

Hi,

I’m following one of the examples and trying to write to a text file. The one thing that I’m struggling with though, is adding a carriage return. the code I’ve got is:

Log ReadText (("Warranty Values/AXWarCaseID1", "Warranty Values/AXWarCaseID2"))
Put ReadText (("Warranty Values/AXWarCaseID1", "Warranty Values/AXWarCaseID2")) into WarCaseID
Log WarCaseID
Log ReadText (("Warranty Values/WarValCaseCat1", "Warranty Values/WarValCaseCat2"))
Put ReadText (("Warranty Values/WarValCaseCat1", "Warranty Values/WarValCaseCat2")) into WarCaseCat
Log WarCaseCat

Put "C:/Eggplant/output.txt" into myfile

if there is a file myfile then
	
	
	open file myfile for appending
	write "Warranty Case ID:" & tab & WarCaseID & return to file myfile at eof
	write "Warranty Case Cat:" & tab & WarCaseCat & return to file myfile at eof
	answer "writing complete"
	close file myfile
	
	open file myfile for reading
	read 200 chars into fileread from file myfile
	Log fileread
	answer fileread
	close file myfile
	
	
else
	
	answer "No"
	
end if

The text is recognised as expected, the file is written to, and when it’s read back and displayed as a message, the carriage return is present.
When I open up the file in notepad though, the text is all on the same line.
Am I using the wrong command?
Would I be better off using a csv file - would that be easier?

Managed to fix it myself - for anyone else with the problem (this is a windows issue, as Linux and Mac handle new lines differently), use crlf instead of return

e.g.

Put "C:/Eggplant/output.txt" into myfile
ask "Please input some data"
Put it & crlf & "Writing new Line" & crlf into sometext

if there is a file myfile then
	
	
	open file myfile for updating
	write sometext to file myfile at eof
	answer "writing complete"
	close file myfile
	
	open file myfile for reading
	read 100 chars into fileread from file myfile
	Log fileread
	answer fileread
	close file myfile
	
	
else
	
	
	
	answer "No"
	
	
end if