Re: [fpc-pascal] Archive libraries

2020-08-20 Thread Tomas Hajny via fpc-pascal
On 2020-08-20 17:10, Darius Blaszyk via fpc-pascal wrote: Hi, To my delight I found out that FPC actually provides quite a few archive handling libraries out of the box. Thanks to all that have contributed to that! So far I found: * tar * tar.gz * zip Are there any other formats out there

Re: [fpc-pascal] go32 tcp

2020-08-28 Thread Tomas Hajny via fpc-pascal
On 2020-08-27 23:42, Andreas via fpc-pascal wrote: Hello Andreas, I would like to use TCP in a DOS FPC project. I see in go32-v2 download page under "Optional-Files" the unit ufclndos. I downloaded it but have not managed to find any documentation for it. Well, the source file should provide

Re: [fpc-pascal] fpcmake packaging

2020-09-01 Thread Tomas Hajny via fpc-pascal
On 2020-09-01 15:29, Ryan Joseph via fpc-pascal wrote: On Sep 1, 2020, at 7:46 PM, Tony Whyman via fpc-pascal wrote: fpcmake is a pre-processor that generates makefiles for fpc projects. You can use it to do just about anything a standard makefile can do, including including resource files a

Re: [fpc-pascal] Lazarus complains that it cannot find a dependency, why?

2020-09-01 Thread Tomas Hajny via fpc-pascal
On 2020-09-01 23:44, Bo Berglund via fpc-pascal wrote: On Tue, 01 Sep 2020 22:46:55 +0200, Bo Berglund via fpc-pascal wrote: Hi, Further to this mystery: If I remove LazSerialPort from the dependencies and instead put SdpoSerialLaz there instead it also solves the problem: - Program builds

Re: [fpc-pascal] Lazarus complains that it cannot find a dependency, why?

2020-09-01 Thread Tomas Hajny via fpc-pascal
On 2020-09-02 00:21, Bo Berglund via fpc-pascal wrote: . . Strange because I have read that cthreads must be first in uses in the lpr program files in order to make threads work. How could it work if I add the dependencies, then it would come later or maybe earlier??? The real requirement is

Re: [fpc-pascal] String literals and code page of .pas source file

2020-09-09 Thread Tomas Hajny via fpc-pascal
On 2020-09-09 13:51, LacaK via fpc-pascal wrote: > This is a bit counter intuitive to me. It is explained here: https://wiki.freepascal.org/Unicode_Support_in_Lazarus IMO "c4" case (c4: String1250 = 'áéíóčž';) is not fully explained. Probably what here happens is, that declared code page of c

Re: [fpc-pascal] How to build for arm6 in RaspberryPi on arm7?

2020-09-09 Thread Tomas Hajny via fpc-pascal
On 2020-09-09 14:43, Bo Berglund via fpc-pascal wrote: On Wed, 09 Sep 2020 00:03:29 +0200, Bo Berglund via fpc-pascal wrote: No, it is on an RPi4 so it is ArmV7. In fact I have been told on the RPi forum RPi4 is Armv8 Armv6: Pi0, PiB, PiA+ Armv7: Pi2Bv1.1 Armv8: Pi2Bv1.2, Pi3, Pi4 But they c

Re: [fpc-pascal] String literals and code page of .pas source file

2020-09-09 Thread Tomas Hajny via fpc-pascal
On 2020-09-09 17:30, Bart via fpc-pascal wrote: On Wed, Sep 9, 2020 at 5:25 PM Tomas Hajny via fpc-pascal wrote: A simple question - is TLabel.Caption declared as Utf8String No. No wonder that the implicit conversion doesn't work then. Adding an explicit conversion would be an

Re: [fpc-pascal] String literals and code page of .pas source file

2020-09-09 Thread Tomas Hajny via fpc-pascal
On 2020-09-09 17:37, Mattias Gaertner via fpc-pascal wrote: On Wed, 09 Sep 2020 17:25:09 +0200 Tomas Hajny via fpc-pascal wrote: On 2020-09-09 13:51, LacaK via fpc-pascal wrote: [...] A simple question - is TLabel.Caption declared as Utf8String (I don't use Lazarus)? _Then_ it should

Re: [fpc-pascal] String literals and code page of .pas source file

2020-09-09 Thread Tomas Hajny via fpc-pascal
On 2020-09-09 17:59, Mattias Gaertner via fpc-pascal wrote: On Wed, 09 Sep 2020 17:44:11 +0200 Tomas Hajny via fpc-pascal wrote: . . The implicit conversion is explicitly expected by the user in this case if I understand it correctly (source in CP1250), right? If you mean the &quo

Re: [fpc-pascal] Fpc make questions...

2020-09-11 Thread Tomas Hajny via fpc-pascal
On 2020-09-11 21:51, Bo Berglund via fpc-pascal wrote: I am not very informed about how make works when building fpc installations, I have just used commands I have gathered online and it has worked... Now I would like to know: 1) Does make clean inside the fpc source dir erase ALL of the binari

Re: [fpc-pascal] String literals and code page of .pas source file

2020-09-12 Thread Tomas Hajny via fpc-pascal
On 2020-09-12 18:51, Jonas Maebe via fpc-pascal wrote: On 12/09/2020 18:44, Sven Barth via fpc-pascal wrote: Jonas Maebe via fpc-pascal > schrieb am Sa., 12. Sep. 2020, 17:47: > All the doubts, questions, and discussions prove that current syste

Re: [fpc-pascal] String literals and code page of .pas source file

2020-09-13 Thread Tomas Hajny via fpc-pascal
On 2020-09-12 23:03, Tomas Hajny wrote: On 2020-09-12 18:51, Jonas Maebe via fpc-pascal wrote: On 12/09/2020 18:44, Sven Barth via fpc-pascal wrote: Jonas Maebe via fpc-pascal > schrieb am Sa., 12. Sep. 2020, 17:47: . . While performing some tests,

Re: [fpc-pascal] String literals and code page of .pas source file

2020-09-14 Thread Tomas Hajny via fpc-pascal
On 2020-09-14 13:39, Michael Van Canneyt wrote: On Mon, 14 Sep 2020, Tomas Hajny via fpc-pascal wrote: On 2020-09-12 23:03, Tomas Hajny wrote: On 2020-09-12 18:51, Jonas Maebe via fpc-pascal wrote: On 12/09/2020 18:44, Sven Barth via fpc-pascal wrote: Jonas Maebe via fpc-pascal <mailto:

Re: [fpc-pascal] String literals and code page of .pas source file

2020-09-14 Thread Tomas Hajny via fpc-pascal
On 2020-09-14 14:20, Michael Van Canneyt wrote: On Mon, 14 Sep 2020, Tomas Hajny via fpc-pascal wrote: On 2020-09-14 13:39, Michael Van Canneyt wrote: On Mon, 14 Sep 2020, Tomas Hajny via fpc-pascal wrote: On 2020-09-12 23:03, Tomas Hajny wrote: On 2020-09-12 18:51, Jonas Maebe via fpc

Re: [fpc-pascal] String literals and code page of .pas source file

2020-09-14 Thread Tomas Hajny via fpc-pascal
On 2020-09-14 14:51, Michael Van Canneyt wrote: On Mon, 14 Sep 2020, Tomas Hajny via fpc-pascal wrote: opened: {$ifdef FPC_HAS_FEATURE_ANSISTRINGS} { if no codepage is yet assigned then assign default ansi codepage } TextRec(t).CodePage:=TranslatePlaceholderCP(TextRec(t).CodePage

Re: [fpc-pascal] String literals and code page of .pas source file

2020-09-14 Thread Tomas Hajny via fpc-pascal
On 2020-09-14 16:09, Michael Van Canneyt wrote: On Mon, 14 Sep 2020, Tomas Hajny via fpc-pascal wrote: application (let's say notepad.exe) will result in garbage. I don't say that it is necessarily bad, but it should be documented at least if we want to keep it that way. I would

Re: [fpc-pascal] String literals and code page of .pas source file

2020-09-14 Thread Tomas Hajny via fpc-pascal
On 2020-09-14 16:09, Michael Van Canneyt wrote: On Mon, 14 Sep 2020, Tomas Hajny via fpc-pascal wrote: application (let's say notepad.exe) will result in garbage. I don't say that it is necessarily bad, but it should be documented at least if we want to keep it that way. I would

Re: [fpc-pascal] -Fu unit search path and network paths

2020-09-21 Thread Tomas Hajny via fpc-pascal
On 2020-09-21 14:44, Marco van de Voort via fpc-pascal wrote: Op 2020-09-21 om 13:44 schreef LacaK via fpc-pascal: are supported in -Fu (unit search path) networks paths? i.e. -Fu\\server\share -Fu\\server\share\path ? Correction: unit cannot be found only if it is placed in "share root" \\se

Re: [fpc-pascal] basic question on begin, end;

2020-09-23 Thread Tomas Hajny via fpc-pascal
On 2020-09-22 14:46, dano none via fpc-pascal wrote: Hello, I have a basic shuffle routine. I put being, end statements in the outer loop for clarification. It ended up producing random results. Commenting out the begin, end combination allows the code to run as expected. My code is below, c

Re: [fpc-pascal] CRT unit and bug #32558

2020-11-06 Thread Tomas Hajny via fpc-pascal
On 2020-11-06 23:54, Ched via fpc-pascal wrote: Dear All, I have some difficulties using the crt unit. For what I can see, https://bugs.freepascal.org/view.php?id=32558 could well be the answer, specialy a call like SetUseACP(False); . At the end of the bug report, it is said that the crt unit

Re: [fpc-pascal] I'm working on automated Help Output for console apps

2020-11-20 Thread Tomas Hajny via fpc-pascal
On 2020-11-20 09:32, Graeme Geldenhuys via fpc-pascal wrote: On 20/11/2020 7:04 am, Sven Barth via fpc-pascal wrote: a way to convert the option list to TConsoleApplication's argument handling so that one doesn't have to declare that twice. Oh, I really like that idea. I'll make sure to incl

Re: [fpc-pascal] Initialization of constant record member of pointer type

2020-12-02 Thread Tomas Hajny via fpc-pascal
On 2020-12-01 11:39, Ladislav Karrach via fpc-pascal wrote: Because MyConst1 is not an *untyped* constant. Only untyped constants can be used in constant expressions (a pointer to something can be considered an untyped constant). The following might work though I did not test it: === code b

Re: [fpc-pascal] Initialization of constant record member of pointer type

2020-12-02 Thread Tomas Hajny via fpc-pascal
On 2020-12-02 16:01, LacaK via fpc-pascal wrote: Dňa 2.12.2020 o 13:55 Tomas Hajny via fpc-pascal napísal(a): On 2020-12-01 11:39, Ladislav Karrach via fpc-pascal wrote: Because MyConst1 is not an *untyped* constant. Only untyped constants can be used in constant expressions (a pointer to

Re: [fpc-pascal] callback from c with varargs

2020-12-20 Thread Tomas Hajny via fpc-pascal
On 2020-12-20 14:00, Jonas Maebe via fpc-pascal wrote: On 20/12/2020 13:01, Luca Olivetti via fpc-pascal wrote: El 19/12/20 a les 23:15, Jonas Maebe via fpc-pascal ha escrit: It is indeed not possible to implement a function with C varargs in FPC. I was afraid that's the answer :-( as an ugl

Re: [fpc-pascal] Selecting Records with a variable

2020-12-20 Thread Tomas Hajny via fpc-pascal
On 2020-12-20 11:56, Sven Barth via fpc-pascal wrote: Am 20.12.2020 um 05:26 schrieb Jean SUZINEAU via fpc-pascal: I know you don't like objects, but maybe something like : Using modeswitch AdvancedRecords that also works with record types. And I'd suggest a case-statement as well. Anything

Re: [fpc-pascal] TurboVision is reborn as FOSS (again)

2020-12-26 Thread Tomas Hajny via fpc-pascal
On 2020-12-26 15:45, gabor via fpc-pascal wrote: W dniu 2020-12-22 o 04:57, Nikolay Nikolov via fpc-pascal pisze: . . Very interesting. But in a future version of the FV (or other TUI framework) apart from migrating from objects to classes, using component streaming, collections, etc... it

Re: [fpc-pascal] Questions from Semi-Beginner

2021-02-20 Thread Tomas Hajny via fpc-pascal
On 2021-02-20 13:49, Sven Barth via fpc-pascal wrote: CSlemaker via fpc-pascal schrieb am Sa., 20. Feb. 2021, 09:48: Hello everybody, Please, note that the original poster (in Cc: now, so that he doesn't miss the response from Sven below) isn't subscribed to fpc-pascal, make sure to inclu

Re: [fpc-pascal] Questions from Semi-Beginner

2021-02-20 Thread Tomas Hajny via fpc-pascal
On 2021-02-20 17:15, Tomas Hajny wrote: On 2021-02-20 13:49, Sven Barth via fpc-pascal wrote: CSlemaker via fpc-pascal schrieb am Sa., 20. Feb. 2021, 09:48: Hello everybody, Please, note that the original poster (in Cc: now, so that he doesn't miss the response from Sven below) isn't subs

Re: [fpc-pascal] Unicode chars losing information

2021-03-08 Thread Tomas Hajny via fpc-pascal
On 2021-03-08 11:59, Adriaan van Os via fpc-pascal wrote: Hi, adriaan% cat uniquizz-utf8.pas {$codepage utf8} program uniquizz; var chars: UnicodeString; begin chars := '⌘ key'; writeln(chars); writeln(chars[1]); writeln( 'size ', sizeOf( chars)); writeln( 'length ', length( char

Re: [fpc-pascal] Unicode chars losing information

2021-03-08 Thread Tomas Hajny via fpc-pascal
On 2021-03-08 15:49, Michael Van Canneyt via fpc-pascal wrote: On Mon, 8 Mar 2021, Adriaan van Os via fpc-pascal wrote: Michael Van Canneyt via fpc-pascal wrote: You didn't configure your environment to deal correctly with Unicode. Wow ! what a sentence ! That sounds like "you didn't config

Re: [fpc-pascal] Unicode chars losing information

2021-03-08 Thread Tomas Hajny via fpc-pascal
On 2021-03-08 21:36, Martin Frb via fpc-pascal wrote: . . In the example the index access should have returned a single codeunit, which was known to be a complete codepoint. As far as I understand the unexpected part was, that the unicode string did not contain the content of the string constan

Re: [fpc-pascal] Unicode chars losing information

2021-03-08 Thread Tomas Hajny via fpc-pascal
On 2021-03-09 01:01, Graeme Geldenhuys via fpc-pascal wrote: On 08/03/2021 2:49 pm, Michael Van Canneyt via fpc-pascal wrote: In that sense, unicode conversion support is something optional and so we require you to enable it explicitly, since enabling it has some drawbacks: Surely if you expl

Re: [fpc-pascal] Unicode chars losing information

2021-03-09 Thread Tomas Hajny via fpc-pascal
On 2021-03-09 09:46, Graeme Geldenhuys via fpc-pascal wrote: On 09/03/2021 1:44 am, Tomas Hajny via fpc-pascal wrote: UnicodeString may be used in a program simply because the included unit has it used in its interface. That may be the case even if there's no use of characters outside

Re: [fpc-pascal] SinclairQL (M68K) Port

2021-03-21 Thread Tomas Hajny via fpc-pascal
On 2021-03-21 10:23, Karoly Balogh via fpc-pascal wrote: On Sat, 20 Mar 2021, Norman Dunbar via fpc-pascal wrote: Hi, . . It would be helpful to beginners like me, trying to look around and fix/implement stuff. I've been all over the Wiki and found this page, https://wiki.freepascal.org/FP

Re: [fpc-pascal] SinclairQL (M68K) Port

2021-03-22 Thread Tomas Hajny via fpc-pascal
On 2021-03-22 12:35, Norman Dunbar via fpc-pascal wrote: > On 21/03/2021 12:07, Tomas Hajny via fpc-pascal wrote: Hi Norman, >> The page https://wiki.freepascal.org/System_unit_structure (referred >> to from the 'RTL development articles' appearing on the 'FPC

Re: [fpc-pascal] Directory Tree

2021-04-06 Thread Tomas Hajny via fpc-pascal
On 2021-04-06 12:29, James Richters via fpc-pascal wrote: Does FPC include any tools to display a directory tree, similar to the way files and folders are normally displayed, but I want to make my own custom entries. Have the branches expand and collapse etc.. It doesn't have to be graphical,

Re: [fpc-pascal] Directory Tree

2021-04-06 Thread Tomas Hajny via fpc-pascal
On 2021-04-06 14:43, James Richters wrote: Is there any documentation or a sample program for TDirListBox? I tried doing a search but only found a page that showed it's functions and procedures, but no real explanation on what they are supposed to do. The functionality is used within the text

Re: [fpc-pascal] Interruption handling on i8086

2021-04-10 Thread Tomas Hajny via fpc-pascal
On 2021-04-09 19:56, Guillermo via fpc-pascal wrote: Hi, > I'm doing DOS development for fun and, after installing the compiler > (was quite hard), I'm having problems handling interrupts. > > I started with keyboard and it doesn't work. The handler declaration: > > procedure DOS_KbdHandler; i

Re: [fpc-pascal] [fpc-devel] Nested function closures

2021-04-29 Thread Tomas Hajny via fpc-pascal
On 2021-04-29 09:00, Mattias Gaertner via fpc-pascal wrote: On Thu, 29 Apr 2021 07:52:19 +0200 Sven Barth via fpc-pascal wrote: [...] You completely ignored my first point, which in this case is the much more significant one: Pascal does not support type inference. FPC does not. Delphi does:

Re: [fpc-pascal] Dependency of OpenSSL 1.0.2 still in FPC 3.2.0 on some platforms?

2021-05-14 Thread Tomas Hajny via fpc-pascal
On 2021-05-15 00:25, Bo Berglund via fpc-pascal wrote: On Wed, 12 May 2021 12:42:14 +0200 (CEST), Michael Van Canneyt via fpc-pascal wrote: So right now I try to read up on how to actually handle the mime object here... And I had an additional question: Does Synapse throw exceptions when e

Re: [fpc-pascal] FTP support gone - switch to HTTP ?

2021-05-18 Thread Tomas Hajny via fpc-pascal
On 2021-05-18 10:38, Michael Van Canneyt via fpc-pascal wrote: On Tue, 18 May 2021, Graeme Geldenhuys via fpc-pascal wrote: On 17/05/2021 3:13 pm, Karoly Balogh via fpc-pascal wrote: I'd actually keep FTP enabled, as it doesn't hurt anything and it's still a thing for retro downloads. Not

Re: [fpc-pascal] FTP support gone - switch to HTTP ?

2021-05-18 Thread Tomas Hajny via fpc-pascal
On 2021-05-18 18:01, Bo Berglund via fpc-pascal wrote: On Tue, 18 May 2021 16:20:29 +0100, Henry Vermaak via fpc-pascal wrote: On Tue, 18 May 2021 at 11:50, Sven Barth via fpc-pascal wrote: I don't think we need to mention any specific clients (and why did your list not include Filezilla? :

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

2021-06-16 Thread Tomas Hajny via fpc-pascal
On 2021-06-16 09:16, Mattias Gaertner via fpc-pascal wrote: On Wed, 16 Jun 2021 08:57:13 +0200 Bo Berglund via fpc-pascal wrote: If I by habit add a bunch of often used units to the uses clause will that affects the size of the compiled application even if they are not in fact used? Yes, if

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

2021-06-16 Thread Tomas Hajny via fpc-pascal
On 2021-06-16 10:58, Marco van de Voort via fpc-pascal wrote: Op 2021-06-16 om 09:16 schreef Mattias Gaertner via fpc-pascal: On Wed, 16 Jun 2021 08:57:13 +0200 Bo Berglund via fpc-pascal wrote: If I by habit add a bunch of often used units to the uses clause will that affects the size of the

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

2021-06-16 Thread Tomas Hajny via fpc-pascal
On 2021-06-16 11:38, Marco van de Voort via fpc-pascal wrote: Op 2021-06-16 om 11:21 schreef Tomas Hajny via fpc-pascal:  Or if they contain $R inclusions. ...or many other things which may not be smartlinked, either because it is not possible, or because the compiler and/or linker cannot do

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] https://sourceforge.net/projects/freepascal/files/Source/3.2.2/ : Missing install.sh

2021-07-07 Thread Tomas Hajny via fpc-pascal
On 2021-07-06 22:37, Jean Pierre CASSOU via fpc-pascal wrote: https://sourceforge.net/projects/freepascal/files/Source/3.2.2/ Missing install.sh This file is included in the fpcbuild package (either zip, or tar.gz), in particular in subdirectory "install". Apart from that - I assume that yo

Re: [fpc-pascal] Code page for the Windows event viewer

2021-09-15 Thread Tomas Hajny via fpc-pascal
On 2021-09-15 15:08, Abuy via fpc-pascal wrote: Instead of cyrillic characters there some garbage in Windows event viewer. Have tried AnsiString with Windows-1251 code page (type StringCP1251 = type AnsiString(1251)) but this does not work. What works is RawByteString variable with the following

Re: [fpc-pascal] Code page for the Windows event viewer

2021-09-16 Thread Tomas Hajny via fpc-pascal
source file is in UTF-8, you need to let the compiler know about this. You can do so by using the compiler option -Fcutf8 (or by using the BOM, but the explicit option is the safest). Tomas On 15.09.2021 16:53, Tomas Hajny via fpc-pascal wrote: On 2021-09-15 15:08, Abuy via fpc-pascal wrote

Re: [fpc-pascal] Make clean error when building fpc 3.2.2 from sources

2021-11-22 Thread Tomas Hajny via fpc-pascal
On 2021-11-22 16:21, Jonas Maebe via fpc-pascal wrote: On 22/11/2021 16:02, Bo Berglund via fpc-pascal wrote: This is what happens when I execute the first make command inside the fpc source dir: ~/devel/fpc/3.2.2$ make clean make: -iVSPTPSOTO: Command not found /usr/bin/rm -f build-s

Re: [fpc-pascal] Putting Delimited text into a StringList

2022-02-07 Thread Tomas Hajny via fpc-pascal
On 2022-02-07 13:20, James Richters via fpc-pascal wrote: I'm trying to use TCSVDocument, I have: Uses Math,sysutils,Classes,CSVReadWrite; That seems to be fine, But I get an error 1D.pas(18,17) Error: Identifier not found "TCSVDocument" On a line: Var CSVData : TCSVDocument; Do I n

Re: [fpc-pascal] converting to UTF8

2022-03-24 Thread Tomas Hajny via fpc-pascal
On 2022-03-24 20:47, Santi via fpc-pascal wrote: El 23/03/2022 a las 10:51, Mattias Gaertner via fpc-pascal escribió: FPC does not yet understand comments, What do you mean with "understand comments"? Mattias meant that comments were the only place where information about use of CP1252 was

Re: [fpc-pascal] Compiler internals. Changing dynamic arrays format

2022-04-13 Thread Tomas Hajny via fpc-pascal
On 2022-04-13 00:34, denisgolovan via fpc-pascal wrote: Hi Denis, I've been maintaining a set of private patches for some quite old FPC revision for some years. . . My first trouble is initialization of dynamic arrays with constant arrays. It looks like simply building one version of comp

Re: [fpc-pascal] Compiler flag define or $IFOPT for optimizations

2022-05-28 Thread Tomas Hajny via fpc-pascal
On 2022-05-28 13:44, Benito van der Zander via fpc-pascal wrote: Hi, I want to show how my program was compiled. Now I have string like "FPC3.2.2 i386-Linux R+C+" from compiler := 'FPC' + {$INCLUDE %FPCVERSION%} + ' ' + {$INCLUDE %FPCTargetCPU%}+'-'+{$INCLUDE %FPCTargetOS%}+ ' ' + {$IfOpt

Re: [fpc-pascal] Be careful of too many features

2022-05-31 Thread Tomas Hajny via fpc-pascal
On 2022-05-31 11:22, Liam Proven via fpc-pascal wrote: On Tue, 31 May 2022 at 04:12, Steve Litt via fpc-pascal wrote: A truly great language would be Turbo Pascal 5.5 (with OOP) plus function/procedure references. Oberon? https://en.wikibooks.org/wiki/Oberon Please, everybody - this strea

Re: [fpc-pascal] Compiler flag define or $IFOPT for optimizations

2022-06-03 Thread Tomas Hajny via fpc-pascal
n the suggested approach should fit well, IMHO. Tomas On 28.05.22 14:34, Tomas Hajny via fpc-pascal wrote: On 2022-05-28 13:44, Benito van der Zander via fpc-pascal wrote: Hi, I want to show how my program was compiled. Now I have string like "FPC3.2.2 i386-Linux R+C+" from c

Re: [fpc-pascal] Cross-compiler for ARM64 on Windows available?

2022-06-21 Thread Tomas Hajny via fpc-pascal
On 2022-06-21 00:14, Pierre Muller via fpc-pascal wrote: Le 20/06/2022 à 23:53, Sven Barth via fpc-pascal a écrit : Am 20.06.2022 um 12:34 schrieb Wolfgang Hubert via fpc-pascal: Hi Pierre (and others ;-) ), . . Windows on AArch64 is currently only supported in main thus you need to comp

Re: [fpc-pascal] Cross-compiler for ARM64 on Windows available?

2022-06-22 Thread Tomas Hajny via fpc-pascal
On 2022-06-21 20:01, Sven Barth wrote: Tomas Hajny via fpc-pascal schrieb am Di., 21. Juni 2022, 18:08: Hi Sven, . . I just tried to follow the advice above. Compiling the cross-compiler (Win32 hosted) is no problem using the fullcycle target (obviously, I could build just the particular

Re: [fpc-pascal] Cross-compiler for ARM64 on Windows available?

2022-06-23 Thread Tomas Hajny via fpc-pascal
On 2022-06-23 19:58, Travis Siegel via fpc-pascal wrote: There actually is a 64-bit version of xp, but it's not compatible with very much.  Apparently, it didn't have an emulator in it, so running 32-bit software wasn't something it did by default.  I never did figure out if it could be made to r

Re: [fpc-pascal] Cross-compiler for ARM64 on Windows available?

2022-06-24 Thread Tomas Hajny via fpc-pascal
On 2022-06-24 09:02, Wolfgang Hubert via fpc-pascal wrote: Hi Wolfgang, thank you for your thoughts and suggestions on this topic. Tomas Hajny wrote: I may be wrong, but I believe that the original poster meant that he was using a "regular" (32-bit) version of WinXP on x86 and wanted to cro

Re: [fpc-pascal] Cross-compiler for ARM64 on Windows available?

2022-06-25 Thread Tomas Hajny via fpc-pascal
On 2022-06-25 10:58, Wolfgang Hubert via fpc-pascal wrote: Hi Wolfgang, if you already have your FPC 3.2.2 installation, plus installation of an external package (LLVM). All of it rather feasible. Yes, you may possibly encounter some issues with the current port to this target (aarch64-win64

[fpc-pascal] Fwd: Re: Cross-compiler for ARM64 on Windows available?

2022-06-25 Thread Tomas Hajny via fpc-pascal
Sorry, one additional thought - it's better to choose a directory without spaces when installing the LLVM package (i.e. not to accept the default proposal "C:\Program Files\..."), or at least let the installer change the PATH variable for you (which is not checked by default). Tomas

Re: [fpc-pascal] Getting Shift key with PTCCRT

2022-09-12 Thread Tomas Hajny via fpc-pascal
On 2022-09-12 21:41, Nikolay Nikolov via fpc-pascal wrote: On 9/10/22 17:57, James Richters via fpc-pascal wrote: Thanks for the suggestion I think the syntax should be: type myKeyEvent = IPTCKeyEvent; Var myShiftStatus : boolean; myShiftStatus := myKeyEvent.Shift; but I get IPTCKeyEvent not

Re: [fpc-pascal] Test Free Pascal program not compiling

2022-09-13 Thread Tomas Hajny via fpc-pascal
On 2022-09-12 21:12, Terry A. Haimann via fpc-pascal wrote: Hello Terry, I personally think it can't find the assembler. I did test this on my desktop and it compiled w/o error. No, but the installed assembler doesn't know the "softvfp" FPU type apparently specified in the compilation opti

Re: [fpc-pascal] Can't build single package

2022-11-02 Thread Tomas Hajny via fpc-pascal
On 2022-11-02 15:25, Luca Olivetti via fpc-pascal wrote: El 2/11/22 a les 9:37, Luca Olivetti via fpc-pascal ha escrit: IIRC I did it in the past but now: D:\fpc-3.2.2\packages\fcl-web>make C:/FPC/3.2.2/bin/i386-Win32/ppc386.exe fpmake.pp -n -Fu../../rtl -Fu../../packages/paszlib -Fu../../pack

Re: [fpc-pascal] Can't build single package

2022-11-02 Thread Tomas Hajny via fpc-pascal
On 2022-11-02 16:40, Luca Olivetti via fpc-pascal wrote: El 2/11/22 a les 15:54, Tomas Hajny via fpc-pascal ha escrit: OK, the problem is that I installed the compiler with the windows installer and the makefile expects it to be in its tree (hence the "-n" and the "-Fu"

Re: [fpc-pascal] Can't build single package

2022-11-03 Thread Tomas Hajny via fpc-pascal
On 2022-11-03 08:58, Luca Olivetti via fpc-pascal wrote: El 2/11/22 a les 17:06, Tomas Hajny via fpc-pascal ha escrit: I see. This means that you already have the prerequisites fulfilled in the source tree for Linux, but not for Windows. Start by issuing 'make rtl_all packages_all&

Re: [fpc-pascal] Working on a new way to educate people about pascal

2022-12-29 Thread Tomas Hajny via fpc-pascal
On 29 December 2022 13:31:57 +0100, Anthony Walter via fpc-pascal wrote: Hello Anthony, . . >I suggest you either brush up on these subjects or refrain from scolding >people on subjects with which you have no practical experience. You asked for feedback and you got it. Please, stop attacking

Re: [fpc-pascal] Working on a new way to educate people about pascal

2022-12-31 Thread Tomas Hajny via fpc-pascal
Hello everybody, Could we get back on topic, please? Discussion of strengths and weaknesses of SQL and/or other database technologies and their history (especially if primarily focusing subjective feelings of different authors rather than use of these database technologies together with FPC)

Re: [fpc-pascal] Downloaded cross-compiler from Sourceforge - wiki incorrect?

2023-03-23 Thread Tomas Hajny via fpc-pascal
On 2023-03-23 09:25, Bo Berglund via fpc-pascal wrote: I tried to add a cross-compiler for Win32 to my existing Lazarus 2.2.4 installation on Windows 10 x64. . . Then opened Lazarus 2.2.4 with my project and changed project options as follows: Compiler_Options/Config_and_Target/Target OS(-T

Re: [fpc-pascal] Converting old pascal written for Pascal/MT+ compiler

2023-03-28 Thread Tomas Hajny via fpc-pascal
On 2023-03-27 11:45, Jacob Kroon via fpc-pascal wrote: Hi, I have some old Pascal code that was compiled in a CPM environment using the Pascal/MT+ compiler from Digital Research. I'm trying to get this project to build in a modern environment, for a start using FreePascal. First, is anyone aw

Re: [fpc-pascal] Converting old pascal written for Pascal/MT+ compiler

2023-03-28 Thread Tomas Hajny via fpc-pascal
On 2023-03-28 11:33, Karoly Balogh via fpc-pascal wrote: Hi, . . You might wanna consider this approach, because if units somehow end up cross-referencing each other, then you might run into difficulties restructuring the code to use Units. Also, it is possible to cross-reference units from

Re: [fpc-pascal] Converting Delphi7 code to FreePascal with interfacing to protection key?

2023-03-30 Thread Tomas Hajny via fpc-pascal
On 30 March 2023 9:36:35 +0200, Marco van de Voort via fpc-pascal wrote: >On 30-3-2023 07:38, Bo Berglund via fpc-pascal wrote: >> The problem seems to be that neither is a valid COFF file according to my Fpc >> (or Lazarus) in any case. Both generate the COFF error when reaching the >> linker >

Re: [fpc-pascal] Converting Delphi7 code to FreePascal with interfacing to protection key?

2023-03-30 Thread Tomas Hajny via fpc-pascal
On 2023-03-30 10:08, Bo Berglund via fpc-pascal wrote: On Thu, 30 Mar 2023 10:02:49 +0200, Tomas Hajny via fpc-pascal wrote: . . I'd suggest trying to switch to external linking (for both versions) - that might help... Could you be more specific? I have never heard of such, I am

Re: [fpc-pascal] Converting old pascal written for Pascal/MT+ compiler

2023-04-04 Thread Tomas Hajny via fpc-pascal
On 2023-04-04 08:16, Jacob Kroon via fpc-pascal wrote: Hi Jacob, . . But I suspect I have a new problem: With the old Pascal/MT+ compiler it would appear that local variables declared in functions/procedures have a life-time that spans the whole program, like a "static" declared variable in

Re: [fpc-pascal] Converting old pascal written for Pascal/MT+ compiler

2023-04-04 Thread Tomas Hajny via fpc-pascal
On 2023-04-04 09:43, Jacob Kroon wrote: Hi Jacob, You don't need to change "var" to "const" - if you want to ensure the variables to persist in between the function/procedure runs, you need to move them to the global level, i.e. outside of the functions/procedures. It is not advisable as a g

Re: [fpc-pascal] Converting old pascal written for Pascal/MT+ compiler

2023-04-04 Thread Tomas Hajny via fpc-pascal
On 2023-04-04 11:14, Sven Barth wrote: Tomas Hajny via fpc-pascal schrieb am Di., 4. Apr. 2023, 09:51: . . If you read the documentation (wiki or the real documentation in PDF/HTML etc.) properly, you don't find there anything saying that constants declared locally within functio

Re: [fpc-pascal] Converting old pascal written for Pascal/MT+ compiler

2023-04-04 Thread Tomas Hajny via fpc-pascal
On 2023-04-04 16:14, Bart via fpc-pascal wrote: On Tue, Apr 4, 2023 at 9:43 AM Jacob Kroon via fpc-pascal wrote: What is the technical downside to using "const", or is it just cosmetic ? If your local "writeable constant" is of type string, and strings are longstrings, and the writeable cons

Re: [fpc-pascal] IRC channel for FreePascal support ?

2023-04-13 Thread Tomas Hajny via fpc-pascal
On 2023-04-13 11:23, Jacob Kroon via fpc-pascal wrote: Hi Jacob, . . Ok, maybe this "Joanna" is on this mailing list and would care to elaborate more why I got banned ? The same "Joanna" also kicked me out of the channel a couple of days ago with the reason that "we don't allow lurkers", si

Re: [fpc-pascal] IRC channel for FreePascal support ?

2023-04-13 Thread Tomas Hajny via fpc-pascal
On 13 April 2023 22:08:58 +0200, "Vojtěch Čihák via fpc-pascal" wrote: Hi, >I'm almost fourteen years on the forum and a few years less on mailing lists >and I never had a single problem. >I don't attend IRC so I can't say what's wrong there. >OTOH I read Joanna's comments on the forum and th

Re: [fpc-pascal] IRC channel for FreePascal support ?

2023-04-14 Thread Tomas Hajny via fpc-pascal
On 2023-04-14 09:43, Michael Van Canneyt via fpc-pascal wrote: Hi, . . I've been contacted as well by email. I received a similar story, and after reading it I believe she (she confirmed it is a female name) is sincere in her wish to keep the channel free from trolls, so it appears to me (a

Re: [fpc-pascal] As I predicted

2023-04-14 Thread Tomas Hajny via fpc-pascal
On 2023-04-14 16:25, Steve Litt via fpc-pascal wrote: Hi all, As I predicted, here's what happened to me on #fpc: == Joanna sets ban on $a:stevelitt * You have been kicked from #fpc by Joanna (sorry i cant share a channel with you after what you s

Re: [fpc-pascal] IRC channel for FreePascal support ?

2023-04-18 Thread Tomas Hajny via fpc-pascal
On 2023-04-18 11:12, Elmar Haneke via fpc-pascal wrote: Just my comments on IRC-Channels. . . Thanks for your input, but as already suggested previously, everybody interested in this topic should preferably use the fpc-other mailing list to keep this one available for discussion related to

Re: [fpc-pascal] Oberon-0

2023-04-19 Thread Tomas Hajny via fpc-pascal
On 2023-04-20 00:34, Ralf Quint via fpc-pascal wrote: On 4/19/2023 1:06 AM, Markus Greim via fpc-pascal wrote: . . A native Oberon0 to Propeller ASM compiler would be fine, but maybe it would be easier to write first an Oberon0 to PropForth compiler. What does Oberon and Forth have to do w

Re: [fpc-pascal] Free Pascal bindings for EyeLink C code (with a god-cast)

2023-06-14 Thread Tomas Hajny via fpc-pascal
On 14 June 2023 20:59:41 +0200, "Rafael Picanço via fpc-pascal" wrote: Hi Rafael, >I am trying to follow your advice and use units instead: > >const > EXTERNAL_DEV_NONE : TGetExButtonStatesFunction = Pointer(0); > >However I am receiving an error: > >Error: Incompatible types: got "Pointer" e

Re: [fpc-pascal] Wrong assignment detected only run time without warning

2023-06-16 Thread Tomas Hajny via fpc-pascal
On 2023-06-16 13:46, Giuliano Colla via fpc-pascal wrote: Il 16/06/23 13:36, Peter B via fpc-pascal ha scritto: Yes. Assigning a 64bit integer to a 32bit one is fine as long as the range is within bounds. Range of a variable can only be checked at run time. I can understand that. But the com

Re: [fpc-pascal] Legitimate use of for and break

2023-06-17 Thread Tomas Hajny via fpc-pascal
On 17 June 2023 20:45:49 +0200, Jean SUZINEAU via fpc-pascal wrote: >Le 17/06/2023 à 20:07, Travis Siegel via fpc-pascal a écrit : >> Is this a relatively new addition to fpc or something? > >I 've just found it in my Delphi 7 code (and code very likely written for >Delphi 4), so I think it's th

Re: [fpc-pascal] Legitimate use of for and break

2023-06-17 Thread Tomas Hajny via fpc-pascal
On 2023-06-18 03:04, Hairy Pixels via fpc-pascal wrote: On Jun 18, 2023, at 1:07 AM, tsie...@softcon.com wrote: This is interesting, because it's the first time I've ever seen "break" as a valid command in pascal, and I've been using pascal since the mid/late 80s. All kinds of dialects too, a

Re: [fpc-pascal] Pchar from constant string

2023-06-29 Thread Tomas Hajny via fpc-pascal
On 2023-06-29 16:22, Mattias Gaertner via fpc-pascal wrote: On Thu, 29 Jun 2023 21:18:44 +0700 Hairy Pixels via fpc-pascal wrote: What is really happening in this snippet? I think it must be implicitly taking the address of the constant string but is it also adding the null terminator automati

Re: [fpc-pascal] Pchar from constant string

2023-06-30 Thread Tomas Hajny via fpc-pascal
On 2023-06-30 11:11, Michael Van Canneyt via fpc-pascal wrote: On Fri, 30 Jun 2023, Hairy Pixels via fpc-pascal wrote: On Jun 30, 2023, at 9:03 AM, Hairy Pixels wrote: That's why that worked. Hmm with short strings the null terminator could be truncated when copying right? Something to l

Re: [fpc-pascal] Parse unicode scalar

2023-07-03 Thread Tomas Hajny via fpc-pascal
On 3 July 2023 8:42:05 +0200, Hairy Pixels via fpc-pascal wrote: >> On Jul 3, 2023, at 12:04 PM, Mattias Gaertner via fpc-pascal >> wrote: >> >> No, the header of a codepoint to figure out the length. > >so the smallest character UTF-8 can represent is 2 bytes? 1 for the header and >1 for the

Re: [fpc-pascal] Parse unicode scalar

2023-07-03 Thread Tomas Hajny via fpc-pascal
On 3 July 2023 9:12:03 +0200, Hairy Pixels via fpc-pascal wrote: >> On Jul 3, 2023, at 2:04 PM, Tomas Hajny via fpc-pascal >> wrote: >> >> No - in this case, the "header" is the highest bit of that byte being 0. > >Oh it's the header BIT. Ad

Re: [fpc-pascal] msdos: unresolved external

2023-07-12 Thread Tomas Hajny via fpc-pascal
On 2023-07-12 12:27, Thomas Kurz via fpc-pascal wrote: I have to extend code from QuickBasic and am using the "msdos" target from FPC 3.2 for that purpose. The resulting exe file is linked with Microsoft Linker for DOS version 5.10. It links *.a files created both from QuickBasic and FPC. The mem

Re: [fpc-pascal] Pointer question

2023-08-09 Thread Tomas Hajny via fpc-pascal
On August 9, 2023 at 22:14:17 +0200, Hairy Pixels via fpc-pascal wrote: >Playing around I had a more questions about pointer operations I've never used >myself. > >1) what does "i := x - x;" do and what is it's purpose and why doesn't "x + x" >work the same? Pointer subtraction is a reverse op

Re: [fpc-pascal] Pointer question

2023-08-09 Thread Tomas Hajny via fpc-pascal
On August 10, 2023 at 0:06:57 +0200, Hairy Pixels via fpc-pascal wrote: >> On Aug 9, 2023, at 2:54 PM, Tomas Hajny via fpc-pascal >> wrote: >> >>> >>> 1) what does "i := x - x;" do and what is it's purpose and why doesn't "x +

Re: [fpc-pascal] Program crash - read the error messages

2023-09-01 Thread Tomas Hajny via fpc-pascal
On 2023-09-01 15:43, Rainer Stratmann via fpc-pascal wrote: Hello, Where can I find the output of the error messages if a program crashes. There is another program that still is running. I want to read the error messages automatically if that is possible. I'm afraid that we'd need a bit mor

Re: [fpc-pascal] Program crash - read the error messages

2023-09-01 Thread Tomas Hajny via fpc-pascal
read them from the remaining program. As an example, TProcess (in unit Process) provides means for all of this. Tomas Am Freitag, 1. September 2023, 16:13:54 CEST schrieb Tomas Hajny via fpc- pascal: On 2023-09-01 15:43, Rainer Stratmann via fpc-pascal wrote: Hello, > Where can I fi

Re: [fpc-pascal] SeekEof issue & 2020 blog post by A Stolyarov

2023-09-11 Thread Tomas Hajny via fpc-pascal
On 2023-09-11 11:08, Alexey Torgashin via fpc-pascal wrote: Translation of blog post http://www.stolyarov.info/node/290 from Ru to En. Sep 6 2020. Author: Andrey Stolyarov, author of Ru books about programming. . . Q (reader): Judging by the state of the ticket, has success been achieved? A

Re: [fpc-pascal] Cannot build fpc on Raspberry Pi4B running PiOS 64 bit (aarch64 Linux)

2023-11-21 Thread Tomas Hajny via fpc-pascal
On November 21, 2023 8:33:55 +0100, Bo Berglund via fpc-pascal wrote: . . >Here I lost you, is SF still in use? I thought that everything moved to GitLab >some time ago? SF is still used for distribution of releases, see download links on FPC web pages. This has nothing to do with migration

  1   2   >