cr lf en fonction de l'os
Publié : sam. 11/juil./2009 12:24
Salut.
Est-ce que ce code est juste ?
Ou peut-être mieux encore puisque cela économise 2 variables.
Bye.
Est-ce que ce code est juste ?
Code : Tout sélectionner
Global CR$ = Chr(13)
Global LF$ = Chr(10)
CompilerIf #PB_Compiler_OS = #PB_OS_Windows
Global EOL$ = CR$ + LF$
CompilerEndIf
CompilerIf #PB_Compiler_OS = #PB_OS_Linux
Global EOL$ = LF$
CompilerEndIf
CompilerIf #PB_Compiler_OS = #PB_OS_MacOS
Global EOL$ = CR$
CompilerEndIf
Code : Tout sélectionner
CompilerIf #PB_Compiler_OS = #PB_OS_Windows
Global EOL$ = Chr(13) + Chr(10)
CompilerEndIf
CompilerIf #PB_Compiler_OS = #PB_OS_Linux
Global EOL$ = Chr(10)
CompilerEndIf
CompilerIf #PB_Compiler_OS = #PB_OS_MacOS
Global EOL$ = Chr(13)
CompilerEndIf