Server 6.6.1 and Multi-Line "put"
Igor de Oliveira Couto
igor at semperuna.com
Tue Apr 29 07:27:17 CEST 2014
Thank you for the tip, Peter:
On 29 Apr 2014, at 2:42 pm, Peter W A Wood <peterwawood at gmail.com> wrote:
> This might be a good way for cross-platform scripting:
> if the outputLineEndings = "cr" then
> set the outputLineEndings to "lf"
> end if
> put "Hello World!" && the date && the time & return & "Goodbye" & return
If we want to make the script also work appropriately on Windows, however, should we leave the outputLineEndings set to “crlf”?:
> The default outputLineEndings on Windows will be CRLF (correct for Windows).
If this is the case, should I do a platform check first, like this?:
-- ensure that we use the correct ‘return' character for this platform:
if the platform is "Win32" then set the outputLineEndings to "crlf"
else set the outputLineEndings to "lf"
put "Hello World!" & return
Would that work on all 3 platforms? - sorry, I don’t have a Windows machine, so can’t test it!
Many thanks for the ongoing assistance!
More information about the use-livecode