Skip to content

Instantly share code, notes, and snippets.

View LarsFosdal's full-sized avatar

Lars Fosdal LarsFosdal

View GitHub Profile
unit osAPITCPEngineServer;
interface
uses
IdCTypes,
IdContext,
IdComponent,
IdTCPServer,
@LarsFosdal
LarsFosdal / FDC.CommandLine.pas
Last active November 24, 2023 16:48
FDC Generic Command Line Parser for Delphi 10.3.x
unit FDC.CommandLine;
/// <summary>
/// Written by Lars Fosdal, August 2019, Delphi 10.3.1
/// Your license to use and modify follows the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license rules.
/// https://creativecommons.org/licenses/by-sa/4.0/
/// </summary>
interface
uses
@LarsFosdal
LarsFosdal / EnumArrayvsEnumSet.dpr
Created February 18, 2019 11:56
Delphi pitfalls: Enumerated types and for loops
program EnumArrayvsEnumSet;
{$APPTYPE CONSOLE}
{$R *.res}
uses
System.SysUtils;
type
TEnum = (plough, foo, bar, wtf);
@LarsFosdal
LarsFosdal / MODBUS.PAS
Created July 3, 2017 07:07
Ancient Generic PLC wrapper code and Modbus implementation.
{$I CODEDEFS.PAS} {Include code generation definitions}
{DEFINE Debug}
UNIT ModBus; {.3 (c) 19880812 Lars Fosdal}
{----------------------------------------------------------------------------}
{ Short System Description }
{----------------------------------------------------------------------------}
{
Source : Turbo Pascal v.4.0
Author : Lars Fosdal