Re: [fpc-pascal] Will the size of an executable depend on the uses clause

2021-06-17 Thread Travis Siegel via fpc-pascal
Heh, how very cool.  I wasn't aware powershell could do such things.  All kinds of new things learned in this thread.  Thanks for that. On 6/17/2021 5:08 AM, Jean SUZINEAU via fpc-pascal wrote: 10 kb of Powerbasic ... you're cheating, it's pascal here ;-) You can do this with just 1kb of Power

Re: [fpc-pascal] Will the size of an executable depend on the uses clause

2021-06-17 Thread Marco van de Voort via fpc-pascal
Op 2021-06-16 om 23:49 schreef Jean SUZINEAU via fpc-pascal: My best score is 67 kb after strip -s with the code below ... ;-) The fact that you use "result" for function result indicates that you use a object pascal mode,  and not the default. If you don't do that (compile in the default mo

Re: [fpc-pascal] Will the size of an executable depend on the uses clause

2021-06-17 Thread Tomas Hajny via fpc-pascal
On 2021-06-16 23:49, Jean SUZINEAU via fpc-pascal wrote: My best score is 67 kb after strip -s with the code below ... ;-) Of course it will not work on every  version of Windows. program uptime; function GetTickCount64: QWord; stdcall; external 'kernel32.dll'; function _2d( _i: Integer): Str

Re: [fpc-pascal] Will the size of an executable depend on the uses clause

2021-06-17 Thread Jean SUZINEAU via fpc-pascal
10 kb of Powerbasic ... you're cheating, it's pascal here ;-) You can do this with just 1kb of PowerShell ... ( may be Pascal script could even be shorter ...) File uptime.ps1 : $MethodDefinition = @" [DllImport("kernel32")] public extern static UInt64 GetTickCount64(); "@ $Kernel32 = Add-Type