Ewon TechForum
Providing technical solutions to technical requests


Newline in PUT
jonteohr Offline
Ewon Distributor
#1
Hi,
I'm trying to append a log message to a file of mine inside the /usr/ folder.
This is my code:
Code:
OPEN "file:/usr/testLog.txt" FOR BINARY APPEND AS 1
 PUT 1, TIME$ + " " + $szMessage$
CLOSE 1

However, I would like to make it so that each time this appends a message to the file, it does it on a new line. Sadly \n did not seem to work. How can I achieve this?
Reply

AngelaT Offline
Ewon Distributor
#2
End your line with CHR$(13)+CHR$(10) (Carriage Return/Line Feed)
Reply





Users browsing this thread:
1 Guest(s)



Theme © Ewon 2019 - Forum software by © MyBB - Cookie policy