[Lazarus] Recommended practices for Win / Linux development.

Denis Kozlov dezlov at gmail.com
Fri Jan 12 00:29:11 CET 2018


On 11/01/2018 15:25, Donald Ziesig via Lazarus wrote:
> How about Line Endings?

You can use system unit constants which will map to the appropriate 
values on each platform:
System.LineEnding 
<https://www.freepascal.org/docs-html/rtl/system/lineending.html>
System.DirectorySeparator 
<https://www.freepascal.org/docs-html/rtl/system/directoryseparator.html>

Also keep in mind that you can write conditional code aimed at specific 
platforms, for example:
{$IFDEF WINDOWS}
   Path := 'C:\Temp\';
{$ELSE}
   Path := '/tmp/';
{$ENDIF}

Denis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20180111/7492eced/attachment.html>


More information about the Lazarus mailing list