Re: [fpc-pascal] Exception handling and .dylibs on MacOS

2025-04-04 Thread Sven Barth via fpc-pascal
Adriaan van Os schrieb am Fr., 4. Apr. 2025, 15:30: > Sven Barth wrote: > > Adriaan van Os mailto:adri...@adriaan.biz>> > > schrieb am Do., 3. Apr. 2025, 14:47: > > > > Well, in what form will a patch along these lines be accepted ? I > > really n

Re: [fpc-pascal] Broken code with PEEPHOLE & REGVAR

2025-03-07 Thread Sven Barth via fpc-pascal
Peter B schrieb am Di., 4. März 2025, 22:48: > Back in 2022, I did expect that the release 3.2.4, including this fix, > would have been out by now. > > Is it possible, that this fix could be applied as a patch to 3.2.2 > (which is what all the Linux distributions are still using). > i.e. is the

Re: [fpc-pascal] Inlined functions from compiled units

2025-01-23 Thread Sven Barth via fpc-pascal
Hairy Pixels via fpc-pascal schrieb am Fr., 24. Jan. 2025, 02:17: > Is the compiler actually able to inline functions which are used from a > unit? When a unit is used it’s compiled to a .o file and linked so the > compiler doesn’t have access to the source code anymore and thus can’t > inline I

Re: [fpc-pascal] Fwd: What to do to get new users

2025-01-23 Thread Sven Barth via fpc-pascal
Hairy Pixels via fpc-pascal schrieb am Fr., 24. Jan. 2025, 06:16: > Feels to me like manual memory management and exceptions don’t mix well. I > use exceptions in C# and Swift and they don’t require all this boiler plate > to prevent memory leaks. > Don't know about Swift, but C# uses garbage co

Re: [fpc-pascal] Set limitations

2025-01-11 Thread Sven Barth via fpc-pascal
Hairy Pixels via fpc-pascal schrieb am Sa., 11. Jan. 2025, 14:17: > I was curious, is there any practical limit on the size of a set (32 bits > and 256 values) and why they couldn’t be 64 bit or any other arbitrary > size? The floor seems to be 4 bytes too but why not allow smaller sizes to > sav

Re: [fpc-pascal] InterlockedExchangeAdd64

2025-01-10 Thread Sven Barth via fpc-pascal
Am 10.01.2025 um 15:43 schrieb Adriaan van Os via fpc-pascal: I have an arm64 (aarch64) test program on MacOS that calls InterlockedExchangeAdd64 with a target variable that is not 8-byte aligned. Running the test program emits "EBusError: Bus error or misaligned data access". So far so goo

Re: [fpc-pascal] Is there a recent change to TProcess?

2024-12-20 Thread Sven Barth via fpc-pascal
James Richters via fpc-pascal schrieb am Fr., 20. Dez. 2024, 15:16: > It does seem that '?' is being substituted in, but I don't know why, the > ascii codes I am using are valid character they are: > #$D0 - #$EF which are these: Þßàáâãäåæçèéêëìíîïï It's not like they are > non-characters like e

Re: [fpc-pascal] How to provide user supplied functionality for mkdir, chdir etc for freertos/esp-idf?

2024-12-17 Thread Sven Barth via fpc-pascal
Christo Crause via fpc-pascal schrieb am Mo., 16. Dez. 2024, 18:02: > How can I provide functionality for chdir, mkdir etc. ? The current > implementation in freertos/sysdir.inc > is hard coded with IO errors, is there a way to override the default > implementation? > > I have implemented RTL fi

Re: [fpc-pascal] Procedural parameters

2024-12-15 Thread Sven Barth via fpc-pascal
Michael Van Canneyt via fpc-pascal schrieb am So., 15. Dez. 2024, 18:25: > > > On Sun, 15 Dec 2024, Adriaan van Os via fpc-pascal wrote: > > > Michael Van Canneyt via fpc-pascal wrote: > >> > >> > >> On Sat, 14 Dec 2024, Adriaan van Os via fpc-pascal wrote: > >> > >> It's not because something is

Re: [fpc-pascal] Procedural parameters

2024-12-15 Thread Sven Barth via fpc-pascal
Am 15.12.2024 um 13:11 schrieb Hairy Pixels via fpc-pascal: On Dec 15, 2024 at 6:28:25 PM, Hairy Pixels wrote: Also noteworthy is ISO standard can accommodate generics which Borland’s design can not. Wait, I’m wrong on this, you can use generic proc types. The problem with generics are poin

Re: [fpc-pascal] Procedural parameters

2024-12-15 Thread Sven Barth via fpc-pascal
Am 15.12.2024 um 01:58 schrieb Hairy Pixels via fpc-pascal: Forcing function types and pointers to be type declaration only is now a limitation for generic procedures and should be reversed. No reason to be following what some Borland engineer was doing in the 80’s when it’s 2024. procedure D

Re: [fpc-pascal] Procedural parameters

2024-12-15 Thread Sven Barth via fpc-pascal
Am 14.12.2024 um 07:35 schrieb Adriaan van Os via fpc-pascal: Macpascal and Iso pascal have procedural parameters, e.g. function A( function B: double): double; Is there a $modeswitch to allow this ? I searched "procedure parameter" and "procedural parameter" in the Language Reference, bu

Re: [fpc-pascal] FPC port to 9front

2024-12-12 Thread Sven Barth via fpc-pascal
Mouad All via fpc-pascal schrieb am Do., 12. Dez. 2024, 09:06: > Is there a port of fpc to 9front/Plan9? > There is none. If not, is it possible to port it to that OS? > In principle it should be possible. Best if you'd get your hands on a cross-assembler and linker for that platform. If reall

Re: [fpc-pascal] Incremental compiling not working in new version

2024-12-04 Thread Sven Barth via fpc-pascal
Michael Van Canneyt via fpc-pascal schrieb am Mi., 4. Dez. 2024, 21:52: > > > On Wed, 4 Dec 2024, Sven Barth via fpc-pascal wrote: > > > Michael Van Canneyt via fpc-pascal > > schrieb am Mi., 4. Dez. 2024, 18:24: > > > >> > >> > >>>

Re: [fpc-pascal] Incremental compiling not working in new version

2024-12-04 Thread Sven Barth via fpc-pascal
Hairy Pixels via fpc-pascal schrieb am Mi., 4. Dez. 2024, 14:24: > On Dec 4, 2024 at 8:13:08 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > >> The likely candidate is the reworked module loading that still has its >> problems. >>

Re: [fpc-pascal] Incremental compiling not working in new version

2024-12-04 Thread Sven Barth via fpc-pascal
Michael Van Canneyt via fpc-pascal schrieb am Mi., 4. Dez. 2024, 18:24: > > > > > > @Michael: do you think you can take a look? I also got the feeling that > it > > tries to compile more while nothing changed than with 3.2.2, though I did > > not yet have the time to nail this down more (or to co

Re: [fpc-pascal] Incremental compiling not working in new version

2024-12-04 Thread Sven Barth via fpc-pascal
Hairy Pixels via fpc-pascal schrieb am Mi., 4. Dez. 2024, 13:56: > Were there known changes in that area since March 3rd 2023? Honestly they > were causing so many crashes maybe they got pulled for incremental > building. I’d rather take the crashes though then what I have now. > The likely cand

Re: [fpc-pascal] Printing unicode characters

2024-12-01 Thread Sven Barth via fpc-pascal
Am 01.12.2024 um 14:37 schrieb Hairy Pixels via fpc-pascal: On Dec 1, 2024 at 2:23:08 PM, Nikolay Nikolov via fpc-pascal wrote: Here's how Free Pascal types map to Unicode terminology: WideChar = UTF-16 code unit UnicodeString = UTF-16 encoded string WideString = UTF-16 encoded string. On Wi

Re: [fpc-pascal] What to do to get new users

2024-11-30 Thread Sven Barth via fpc-pascal
Hairy Pixels via fpc-pascal schrieb am Sa., 30. Nov. 2024, 09:53: > On Nov 30, 2024 at 3:11:10 PM, Michael Van Canneyt via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > >> This is very much on topic. FPC has no build system >> >> Huh ? Of course it does, it has 2. fpcmake (older) and f

Re: [fpc-pascal] What to do to get new users

2024-11-21 Thread Sven Barth via fpc-pascal
Travis Siegel via fpc-pascal schrieb am Mi., 20. Nov. 2024, 15:47: > You missed the part when I said without some IDE or other. > > Show me a raw source file that doesn't depend on any IDE at all written > in FPC, something I can compile from the command line using *only* FPC > default installed

Re: [fpc-pascal] Fwd: What to do to get new users

2024-11-17 Thread Sven Barth via fpc-pascal
Am 15.11.2024 um 15:26 schrieb Steve Litt via fpc-pascal: Nikolay Nikolov via fpc-pascal said on Wed, 16 Oct 2024 12:44:35 +0300 Do you have a garbage collection proposal for Pascal? Free Pascal has a JVM target that supports garbage collection and pretty much nobody is using it. Why do you t

Re: [fpc-pascal] What to do to get new users

2024-11-17 Thread Sven Barth via fpc-pascal
Am 15.11.2024 um 15:23 schrieb Steve Litt via fpc-pascal: Second, fpc is neither fish nor fowl: It has way too much "stuff" to be an easy to learn or use language, but that "stuff" isn't useful to most non-Lazarus users. The solution to this problem is to publicize the hell out of the -M tp mode,

Re: [fpc-pascal] What to do to get new users

2024-11-17 Thread Sven Barth via fpc-pascal
Am 15.11.2024 um 23:35 schrieb Steve Litt via fpc-pascal: Sven Barth via fpc-pascal said on Thu, 17 Oct 2024 07:46:22 +0200 Am 17.10.2024 um 01:51 schrieb Rainer Stratmann via fpc-pascal: Am Donnerstag, 17. Oktober 2024, 00:08:27 CEST schrieb Sven Barth via fpc- pascal: News flash: this is

Re: [fpc-pascal] What to do to get new users

2024-11-17 Thread Sven Barth via fpc-pascal
Am 16.11.2024 um 16:42 schrieb Marcos Douglas B. Santos via fpc-pascal: "anonymous procedures" now exist and can also be declared "anywhere"; You didn't get the important part of the feature then. The important part is less the anonymous function, but the function reference. That you can have

Re: [fpc-pascal] Power operator fails in ordinal range definition

2024-11-14 Thread Sven Barth via fpc-pascal
Hairy Pixels via fpc-pascal schrieb am Do., 14. Nov. 2024, 08:03: > On Nov 14, 2024 at 1:53:17 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > >> The **-operator is not *implemented* by the compiler. It's provided >> through the Mat

Re: [fpc-pascal] Power operator fails in ordinal range definition

2024-11-13 Thread Sven Barth via fpc-pascal
Hairy Pixels via fpc-pascal schrieb am Do., 14. Nov. 2024, 06:24: > This gives me "Error in type definition”. A bug? > > type > TMyRec = record > type > T = 0..256**4; > end; > The **-operator is not *implemented* by the compiler. It's provided through the Math unit. Thus you can't

Re: [fpc-pascal] Managed record types

2024-11-03 Thread Sven Barth via fpc-pascal
Thomas Kurz via fpc-pascal schrieb am Sa., 2. Nov. 2024, 18:47: > when I make a record type managed by adding an `Initialize` operator > according to [1], can I rely on the record being initialized at the > beginning of a function in which the record is the function result? > > Example: > > type

Re: [fpc-pascal] type helpers in trunk

2024-11-03 Thread Sven Barth via fpc-pascal
Adriaan van Os via fpc-pascal schrieb am Sa., 2. Nov. 2024, 16:14: > Has something changed for type helpers in fpc trunk ? I don 't see a note > of it in > . I have code that > compiles with 3.2.2, but the > trunk compiler doesn't recognize (or does

Re: [fpc-pascal] Generic type helper

2024-10-31 Thread Sven Barth via fpc-pascal
Thomas Kurz via fpc-pascal schrieb am Do., 31. Okt. 2024, 18:36: > a quick question: how do I define a generic type helper? > You don't. FPC doesn't support them yet. Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://li

Re: [fpc-pascal] Understanding error messages in static linking

2024-10-31 Thread Sven Barth via fpc-pascal
Thomas Kurz via fpc-pascal schrieb am Di., 20. Aug. 2024, 18:16: > And this is the point where I'm completely stuck. Is there anything I can > try or is it just impossible to create an .exe which doesn't depend need > the libcrypto DLL? > > Please, I don't want to discuss the pros and cons about

Re: [fpc-pascal] Library packages

2024-10-28 Thread Sven Barth via fpc-pascal
Adriaan van Os via fpc-pascal schrieb am Mo., 28. Okt. 2024, 08:27: > Can someone tell me what the status is of Library packages, aka "Delphi > packages" ? I found the > WIki but it looks like a > preliminary document. > Compile time usage of dynamic packag

Re: [fpc-pascal] Fwd: What to do to get new users

2024-10-21 Thread Sven Barth via fpc-pascal
Nikolay Nikolov via fpc-pascal schrieb am Mo., 21. Okt. 2024, 08:32: > 2) record types (as opposed to class), which can live on the stack and > have a pass-by-value semantics. FPC trunk supports advanced records, so you > get C++-style copy constructors. > Advanced records are already supported

Re: [fpc-pascal] How do I pass a call back Class and its method to an external library *.so file writting in C++

2024-10-20 Thread Sven Barth via fpc-pascal
Dennis via fpc-pascal schrieb am Mo., 21. Okt. 2024, 05:09: > > >> I am expected to create and pass an instance of such class >> ApiProxyWrapperReply in my calling program >> via a function >> void SPAPI_RegisterApiProxyWrapperReply(ApiProxyWrapperReply* >> apiProxyWrapperReply); >> >> and the

Re: [fpc-pascal] What to do to get new users

2024-10-19 Thread Sven Barth via fpc-pascal
Liam Proven via fpc-pascal schrieb am Sa., 19. Okt. 2024, 21:05: > On Fri, 18 Oct 2024 at 21:23, Travis Siegel via fpc-pascal > wrote: > > > > Also, I see very few (if any) examples of how to generate GUI apps when > > using fpc commandline compiling, (again, without lazarus in the mix). > > The

Re: [fpc-pascal] Fwd: What to do to get new users

2024-10-19 Thread Sven Barth via fpc-pascal
Hairy Pixels via fpc-pascal schrieb am Sa., 19. Okt. 2024, 15:14: > On Oct 19, 2024 at 8:10:02 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > >> For a class one can override NewInstance and FreeInstance. And with >> TVirtualMethodI

Re: [fpc-pascal] Fwd: What to do to get new users

2024-10-19 Thread Sven Barth via fpc-pascal
Hairy Pixels via fpc-pascal schrieb am Sa., 19. Okt. 2024, 14:49: > On Oct 19, 2024 at 7:37:15 PM, Martin Frb via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > >> Because if the latter, well I know some people who would shot the person >> introducing that in a high performance software

Re: [fpc-pascal] Fwd: What to do to get new users

2024-10-19 Thread Sven Barth via fpc-pascal
Hairy Pixels via fpc-pascal schrieb am Sa., 19. Okt. 2024, 14:20: > On Oct 19, 2024 at 3:35:25 PM, Michael Van Canneyt via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > >> You are not taking the reasoning to its logical conclusion. >> >> These "new users" will want to have some standar

Re: [fpc-pascal] Fwd: What to do to get new users

2024-10-19 Thread Sven Barth via fpc-pascal
Hairy Pixels via fpc-pascal schrieb am Sa., 19. Okt. 2024, 03:18: > On Oct 19, 2024 at 2:31:36 AM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > >> This would mean that a new class type or some kind of additional >> attribute would have to be

Re: [fpc-pascal] Fwd: What to do to get new users

2024-10-18 Thread Sven Barth via fpc-pascal
Hairy Pixels via fpc-pascal schrieb am Fr., 18. Okt. 2024, 17:21: > On Oct 18, 2024 at 3:41:49 PM, Karoly Balogh via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > >> Maybe it was mentioned in the thread, I just glanced through it, but how >> about ARC (Automatic Reference Counting), Ob

Re: [fpc-pascal] Fwd: What to do to get new users

2024-10-17 Thread Sven Barth via fpc-pascal
Michael Van Canneyt schrieb am Do., 17. Okt. 2024, 14:37: > > > On Thu, 17 Oct 2024, Sven Barth via fpc-pascal wrote: > > > Michael Van Canneyt via fpc-pascal > > schrieb am Do., 17. Okt. 2024, 11:40: > > > >> > >> > >> On Wed, 16 Oct 2

Re: [fpc-pascal] Fwd: What to do to get new users

2024-10-17 Thread Sven Barth via fpc-pascal
Nikolay Nikolov via fpc-pascal schrieb am Do., 17. Okt. 2024, 09:16: > > In 2024 you don’t need the performance of manual memory management in UI > apps. Garbage collector or anything else will work perfectly well. > > Well, surely, you can probably use something like this with Free Pascal as > w

Re: [fpc-pascal] Fwd: What to do to get new users

2024-10-17 Thread Sven Barth via fpc-pascal
Michael Van Canneyt via fpc-pascal schrieb am Do., 17. Okt. 2024, 11:40: > > > On Wed, 16 Oct 2024, Hairy Pixels via fpc-pascal wrote: > > > On Oct 17, 2024 at 12:03:47 AM, Guillermo Martínez Jiménez via > fpc-pascal < > > fpc-pascal@lists.freepascal.org> wrote: > > > >> Prease DON'T add garbage

Re: [fpc-pascal] What to do to get new users

2024-10-17 Thread Sven Barth via fpc-pascal
Peter B via fpc-pascal schrieb am Do., 17. Okt. 2024, 13:29: > Anybody, > on the subject of llvm; does anyone know if the option of llvm > back-end for fpc is ever going to make an official release? > The LLVM port has some shortcomings that will for the foreseeable future have it be a less good

Re: [fpc-pascal] What to do to get new users

2024-10-16 Thread Sven Barth via fpc-pascal
Am 17.10.2024 um 01:51 schrieb Rainer Stratmann via fpc-pascal: Am Donnerstag, 17. Oktober 2024, 00:08:27 CEST schrieb Sven Barth via fpc- pascal: News flash: this is how well behaved Linux applications are supposed to behave no matter if they are a "Linux system program" or not. H

Re: [fpc-pascal] What to do to get new users

2024-10-16 Thread Sven Barth via fpc-pascal
Am 17.10.2024 um 03:42 schrieb Ralf Quint via fpc-pascal: On 10/16/2024 2:49 PM, James Richters via fpc-pascal wrote: >> By and large, FPC (and Lazarus) is installed rather quickly. The only thing I wish for the installation of FPC is that all the help files were included and installed by def

Re: [fpc-pascal] What to do to get new users

2024-10-16 Thread Sven Barth via fpc-pascal
Am 17.10.2024 um 01:57 schrieb Rainer Stratmann via fpc-pascal: Am Mittwoch, 16. Oktober 2024, 23:12:08 CEST schrieb Michael Van Canneyt via fpc-pascal: Actually, my employer has already offered twice to sponsor a web-designer to overhaul the website. Money was not an issue. The idea was to anno

Re: [fpc-pascal] What to do to get new users

2024-10-16 Thread Sven Barth via fpc-pascal
Rainer Stratmann via fpc-pascal schrieb am Mi., 16. Okt. 2024, 01:16: > - Linux: All relevant files (executable files, configuration files, source > code, > etc.) are scattered all over the Linux system. This is very complicated > again. > If Lazarus/Freepascal were a Linux system program it woul

Re: [fpc-pascal] Fwd: What to do to get new users

2024-10-16 Thread Sven Barth via fpc-pascal
Nikolay Nikolov via fpc-pascal schrieb am Mi., 16. Okt. 2024, 11:44: > As for the language I think for GUI apps programmers don’t need or want a > manual memory managed language like Pascal and would prefer something like > C#. In general the ease of programming is not there in Pascal compared to

Re: [fpc-pascal] Fwd: What to do to get new users

2024-10-16 Thread Sven Barth via fpc-pascal
Hairy Pixels via fpc-pascal schrieb am Mi., 16. Okt. 2024, 13:49: > As for the language I think for GUI apps programmers don’t need or want a >> manual memory managed language like Pascal and would prefer something like >> C#. In general the ease of programming is not there in Pascal compared to

Re: [fpc-pascal] What to do to get new users

2024-10-16 Thread Sven Barth via fpc-pascal
Stefan-Iulian Alecu via fpc-pascal schrieb am Mi., 16. Okt. 2024, 23:38: > > Lazarus does not look complicated. It has it own distinctive look & feel. > > User > > should be able to completely detach windows from from main so it would be > > possible to move them to different monitor, virtual des

Re: [fpc-pascal] What to do to get new users

2024-10-16 Thread Sven Barth via fpc-pascal
geneb via fpc-pascal schrieb am Mi., 16. Okt. 2024, 16:19: > > > I have always found that the self-contained nature of Pascal/Delphi > > executables is a big advantage over other language systems. Just copy > > the file and run it, even on a system that has never seen a > > Pascal/Delphi executab

Re: [fpc-pascal] What to do to get new users

2024-10-16 Thread Sven Barth via fpc-pascal
Stefan-Iulian Alecu via fpc-pascal schrieb am Mi., 16. Okt. 2024, 16:08: > I am aware of your work. As long as you still depend on CodeTools and > Lazarus internals, the language server can't be called independent. > The point of using CodeTools is that they are kept fairly up to date with what

Re: [fpc-pascal] What to do to get new users

2024-10-16 Thread Sven Barth via fpc-pascal
Hairy Pixels via fpc-pascal schrieb am Mi., 16. Okt. 2024, 16:07: > Another point is that FPC doesn’t have an official forum except for the > mail list and that in and of itself is a problem if you ask me. Most young > people don’t use email and won’t like this. I myself don’t prefer the mail > l

Re: [fpc-pascal] AllocateThreadVars ?

2024-10-10 Thread Sven Barth via fpc-pascal
Adriaan van Os via fpc-pascal schrieb am Mi., 9. Okt. 2024, 16:44: > I have a program on MacOS that calls CoreAudio which calls the application > back in a so-called > AURendererCallback in a separate (com.apple.audio.IOThread.client) thread. > This is a pthread > created by the system software,

Re: [fpc-pascal] How do I pass a call back Class and its method to an external library *.so file writting in C++

2024-10-04 Thread Sven Barth via fpc-pascal
Dennis via fpc-pascal schrieb am Fr., 4. Okt. 2024, 08:40: > Dear All, > > I am given an API linux library *.so file written in C++. > It was expected to be consume by a program written in C++. > However, I would like to write such a program in Free Pascal. [snip] > I am expected to create an

Re: [fpc-pascal] Sub-millisecond time measuring

2024-07-01 Thread Sven Barth via fpc-pascal
Adriaan van Os via fpc-pascal schrieb am Sa., 29. Juni 2024, 21:21: > Michael Van Canneyt via fpc-pascal wrote: > >> Is that a function in the RTL? I can't find it. > > > > No, these are platform-specific functions. > > > > g_get_monotonic_time is probably just an alias for the linux/freebsd > >

Re: [fpc-pascal] Heap trace on mac still not working?

2024-07-01 Thread Sven Barth via fpc-pascal
Hairy Pixels via fpc-pascal schrieb am Mo., 1. Juli 2024, 03:49: > oh it uses external debug symbols! Now it's finally reporting some > locations, thanks I should have been able to figure that out. Hmmm can't > the compiler print stack traces without debug info? Maybe not. > The *compiler* isn't

Re: [fpc-pascal] How to use external linker on windows i386

2024-06-07 Thread Sven Barth via fpc-pascal
Sven Barth schrieb am Do., 6. Juni 2024, 11:16: > Ondrej Pokorny via fpc-pascal schrieb > am Do., 6. Juni 2024, 09:30: > >> Hello, >> >> I am on Windows 64bit, but using the i386 compiler. >> >> I have to link a 3rd party OBJ file with {$L 'xyz.obj&#

Re: [fpc-pascal] How to use external linker on windows i386

2024-06-07 Thread Sven Barth via fpc-pascal
Ondrej Pokorny schrieb am Do., 6. Juni 2024, 11:56: > On 06.06.2024 11:16, Sven Barth via fpc-pascal wrote: > > Ondrej Pokorny via fpc-pascal schrieb > am Do., 6. Juni 2024, 09:30: > >> Hello, >> >> I am on Windows 64bit, but using the i386 compiler. >>

Re: [fpc-pascal] How to use external linker on windows i386

2024-06-06 Thread Sven Barth via fpc-pascal
Ondrej Pokorny via fpc-pascal schrieb am Do., 6. Juni 2024, 09:30: > Hello, > > I am on Windows 64bit, but using the i386 compiler. > > I have to link a 3rd party OBJ file with {$L 'xyz.obj'}. > > With the internal linker I get these errors: > Error: COMDAT selection mode 0 not supported (section

Re: [fpc-pascal] Custom NewInstance allocator

2024-06-04 Thread Sven Barth via fpc-pascal
Hairy Pixels via fpc-pascal schrieb am Di., 4. Juni 2024, 10:54: > In the manual it at https://www.freepascal.org/docs-html/ref/refse38.html > it says "Calling the constructor will provoke a call to the virtual class > method NewInstance, which, in its default implementation, calls GetMem, to > a

Re: [fpc-pascal] Type-casting a class variable

2024-05-01 Thread Sven Barth via fpc-pascal
Adriaan van Os via fpc-pascal schrieb am Mi., 1. Mai 2024, 17:07: > Suppose I have a > > var myClass: TClass > > and (for example) a > > class function TWindow.CreateNewWindow( ) > > Now I want to call CreateNewWindow for var myClass. Of course, depending > on the class, > Cre

Re: [fpc-pascal] AnsiString address changed

2024-03-18 Thread Sven Barth via fpc-pascal
Hairy Pixels via fpc-pascal schrieb am Mo., 18. März 2024, 13:30: > > > > On Mar 18, 2024, at 5:29 PM, Michael Van Canneyt via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > Of course there must be, that's the whole point of copy-on-write. > > > > As soon as one reference is chang

Re: [fpc-pascal] Floating point question

2024-02-19 Thread Sven Barth via fpc-pascal
James Richters via fpc-pascal schrieb am Di., 20. Feb. 2024, 04:42: > I don't know why it would be different in Windows than on Linux. If you're using Win64, then the answer is simple: x86_64-win64 unlike any other x86 target does not support Extended, so neither the compiler nor the code in ru

Re: [fpc-pascal] Can FPC link a program with static (.a) libraries on Windows

2024-02-16 Thread Sven Barth via fpc-pascal
Tony Whyman via fpc-pascal schrieb am Sa., 17. Feb. 2024, 00:50: > I have a Pascal program, compiled with FPC 3.2.2 and which appears to > happily link and run with a static library compiled with gcc and having > a ".a" prefix on linux. The functions in the static library and declared > as extern

Re: [fpc-pascal] "Unexpected end of file" when having an open comment after the final "end."

2024-02-10 Thread Sven Barth via fpc-pascal
Ralf Quint via fpc-pascal schrieb am Fr., 9. Feb. 2024, 20:36: > On 2/8/2024 11:01 AM, Martin Wynne via fpc-pascal wrote: > > Hi Thomas, > > > > The error is not the file content after "end.". > > > > The error is not having the expected "end;" after "begin". > > > > This works ok: > > > > __

Re: [fpc-pascal] "Unexpected end of file" when having an open comment after the final "end."

2024-02-08 Thread Sven Barth via fpc-pascal
Martin Wynne via fpc-pascal schrieb am Do., 8. Feb. 2024, 22:03: > Hi Thomas, > > The error is not the file content after "end.". > > The error is not having the expected "end;" after "begin". > > This works ok: > > _ > > program test; > > begin > end; > > end. > > abc 123

Re: [fpc-pascal] "Unexpected end of file" when having an open comment after the final "end."

2024-02-08 Thread Sven Barth via fpc-pascal
Thomas Kurz via fpc-pascal schrieb am Do., 8. Feb. 2024, 13:31: > Hello all, > > I'm unsure about whether or not to report this as a bug. Imho, it is a > bug, but maybe there's a good reason to handle this. > Please report a bug. Regards, Sven ___ fpc

Re: [fpc-pascal] Need some advice

2024-01-24 Thread Sven Barth via fpc-pascal
ppadilcdx via fpc-pascal schrieb am Mi., 24. Jan. 2024, 22:07: > Thanks for that, now it compiles but it doesn't work, i.e. I added a > pair and value and then used trygetdata and it can't find it. So perhaps > I'm missing something else : > Your operator needs to establish a true order between

Re: [fpc-pascal] IntToStr implementation

2024-01-17 Thread Sven Barth via fpc-pascal
Hairy Pixels via fpc-pascal schrieb am Do., 18. Jan. 2024, 00:44: > > > > On Jan 17, 2024, at 10:15 PM, Marco van de Voort via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > > > Op 17-1-2024 om 15:57 schreef Hairy Pixels via fpc-pascal: > >> Can anyone show me where to find the In

Re: [fpc-pascal] What's in Hello World

2024-01-07 Thread Sven Barth via fpc-pascal
Am 07.01.2024 um 11:39 schrieb Michael Van Canneyt via fpc-pascal: On Sun, 7 Jan 2024, Sven Barth via fpc-pascal wrote: Am 07.01.2024 um 10:01 schrieb Florian Klämpfl via fpc-pascal: Am 06.01.2024 um 20:05 schrieb Matthew Phillips via fpc-pascal : I compiled the Hello World program

Re: [fpc-pascal] What's in Hello World

2024-01-07 Thread Sven Barth via fpc-pascal
Am 07.01.2024 um 10:01 schrieb Florian Klämpfl via fpc-pascal: Am 06.01.2024 um 20:05 schrieb Matthew Phillips via fpc-pascal : I compiled the Hello World program from the docs and noticed that it's 435k. Compared to a lot of newer languages, like Golang, that's not bad at all. I then compi

Re: [fpc-pascal] How to avoid Copy

2024-01-02 Thread Sven Barth via fpc-pascal
Amir--- via fpc-pascal schrieb am Mi., 3. Jan. 2024, 07:53: > Yeap! That is actually what I posted here (Feature Request) > . > My example allows you to access it right now with the existing FPC release. Regards, Sven > _

Re: [fpc-pascal] How to avoid Copy

2024-01-02 Thread Sven Barth via fpc-pascal
Am 31.12.2023 um 04:11 schrieb Amir--- via fpc-pascal: On 12/30/23 00:20, Sven Barth via fpc-pascal wrote: Amir via fpc-pascal schrieb am Sa., 30. Dez. 2023, 08:11: On Dec 29, 2023 9:50 PM, Adriaan van Os wrote: Amir--- via fpc-pascal wrote: > Hi

Re: [fpc-pascal] How to avoid Copy

2024-01-02 Thread Sven Barth via fpc-pascal
Am 01.01.2024 um 16:51 schrieb Wayne Sherman via fpc-pascal: On Mon, Jan 1, 2024 at 6:14 AM Hairy Pixels wrote: On Jan 1, 2024, at 3:50 PM, Michael Van Canneyt wrote: You can't optimize that. As said, a generic is convenient but slow. I don't know about that. Like was mentioned the enumerator n

Re: [fpc-pascal] How to avoid Copy

2023-12-30 Thread Sven Barth via fpc-pascal
Amir via fpc-pascal schrieb am Sa., 30. Dez. 2023, 08:11: > > > On Dec 29, 2023 9:50 PM, Adriaan van Os wrote: > > Amir--- via fpc-pascal wrote: > > Hi all, > > > > I have a List of record, where the record has a WideString field. > > I have some code like the following: > > > > function chec

Re: [fpc-pascal] Procedures that work like WRITELN()

2023-12-27 Thread Sven Barth via fpc-pascal
Am 27.12.2023 um 12:25 schrieb James Richters via fpc-pascal: I wanted to write what I thought should be a simple procedure, just instead of calling WRITELN() with some arguments, call WRITELOG() with the same arguments that you would use to write to a file, but my WRITELOG() procedure would

Re: [fpc-pascal] Read Field names from VMT

2023-12-27 Thread Sven Barth via fpc-pascal
Am 26.12.2023 um 21:29 schrieb Amir--- via fpc-pascal: On 12/26/23 01:14, Sven Barth via fpc-pascal wrote: Amir--- via fpc-pascal schrieb am Di., 26. Dez. 2023, 07:03: Hi,    I want to retrieve the name of the fields in a record/class, at run time. It looks like

Re: [fpc-pascal] Read Field names from VMT

2023-12-26 Thread Sven Barth via fpc-pascal
Amir--- via fpc-pascal schrieb am Di., 26. Dez. 2023, 07:03: > Hi, > >I want to retrieve the name of the fields in a record/class, at run > time. It looks like "TVmt.vFieldTable" is what I need. But I cannot find > any documentation about how to explore the content of this table. I > apprecia

Re: [fpc-pascal] More syntax questions (part 3)

2023-12-26 Thread Sven Barth via fpc-pascal
Wayne Sherman via fpc-pascal schrieb am Mo., 25. Dez. 2023, 15:46: > On Mon, Dec 25, 2023 Michael Van Canneyt wrote: > > In short: To make a EBNF grammar which is 100% correct is not so simple > > and will make the scheme extremely difficult to understand for a reader. > > So I prefer to present

Re: [fpc-pascal] method-definition

2023-12-17 Thread Sven Barth via fpc-pascal
Michael Van Canneyt via fpc-pascal schrieb am Sa., 16. Dez. 2023, 09:43: > The requirement for parameters in record constructors I guess comes from > C++ builder by Embarcadero. > There are some limitations imposed by C++. > > Whether they could be dropped in FPC is something Sv

Re: [fpc-pascal] case statement

2023-12-14 Thread Sven Barth via fpc-pascal
James Richters via fpc-pascal schrieb am Do., 14. Dez. 2023, 20:13: > I didn’t know there was such a thing as OTHERWISE. Is there any > functional difference between OTHERWISE and ELSE? > "otherwise" is what had been defined by ISO Extended Pascal for the cause-statement. Aside from not having

Re: [fpc-pascal] Error when building fpc on aarch64-linux still not resolved

2023-12-09 Thread Sven Barth via fpc-pascal
Bo Berglund via fpc-pascal schrieb am So., 10. Dez. 2023, 01:19: > On Thu, 16 Nov 2023 13:15:27 +0100, Bo Berglund via fpc-pascal > wrote: > > >I tried to post this to the devel list but it seems to have failed so now > trying > >the general list instead... > > > >See ticket: > >https://gitlab.c

Re: [fpc-pascal] what is release plan for fpc?

2023-12-07 Thread Sven Barth via fpc-pascal
Bo YU via fpc-pascal schrieb am Do., 7. Dez. 2023, 12:58: > Hi, > > I am sorry if this is not the right mail list to ask the question. > > I am helping to build fpc package on Debian riscv64 and found that: > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1052557 > > Now fpc version on Debian

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

2023-11-25 Thread Sven Barth via fpc-pascal
Bo Berglund via fpc-pascal schrieb am Sa., 25. Nov. 2023, 08:19: > On Tue, 21 Nov 2023 10:33:46 +0100, Tomas Hajny via fpc-pascal > wrote: > > >On November 21, 2023 8:33:55 +0100, Bo Berglund via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > >>I did not know that there is a library of

Re: [fpc-pascal] TPath enhancements (Issue #40513): can somebody test with Delphi 12?

2023-11-19 Thread Sven Barth via fpc-pascal
Bart via fpc-pascal schrieb am Sa., 18. Nov. 2023, 18:24: > 1. The docs state that an exception is raised if the given paths > contain invalid characters. Does the vlaue of the ValidateParams have > any influence on this? > Also: does this depend on the operating system and/or file system? Cause

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

2023-11-18 Thread Sven Barth via fpc-pascal
Bo Berglund via fpc-pascal schrieb am Sa., 18. Nov. 2023, 11:32: > Today after realizing that I did the following on an RPi4B where I have > used apt > to install the fpc compiler so I could use that as the seed compiuler to > build > from sources. > Why don't you simply follow what I DID? First

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

2023-11-17 Thread Sven Barth via fpc-pascal
Bo Berglund via fpc-pascal schrieb am Do., 16. Nov. 2023, 08:19: > From the Lazarus list: > > >Just a quick follow-up here: > >It seems like the fpc sources have not been updated with the solution to > the bug > >discussed here: > > > >https://gitlab.com/freepascal.org/fpc/source/-/issues/39295 >

Re: [fpc-pascal] Incompatible procedure types

2023-11-08 Thread Sven Barth via fpc-pascal
Hairy Pixels schrieb am Do., 9. Nov. 2023, 01:37: > > > > On Nov 8, 2023, at 1:50 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > Please provide example code so that one can look at it. Such messages > without example ar

Re: [fpc-pascal] Incompatible procedure types

2023-11-07 Thread Sven Barth via fpc-pascal
Hairy Pixels via fpc-pascal schrieb am Mi., 8. Nov. 2023, 01:48: > What does this error mean? It's comparing a pointer to a procedure to a > procedure variable (a callback). The signature appears exactly the same > "function(TSymbol;TSymbol):LongInt is nested" so what's the problem? > > error: In

Re: [fpc-pascal] Creating capturers

2023-11-05 Thread Sven Barth via fpc-pascal
Hairy Pixels schrieb am Sa., 4. Nov. 2023, 15:48: > > > > On Nov 4, 2023, at 4:22 PM, Sven Barth > wrote: > > > > Then don't assign them every "frame". If you just keep them around then > they aren't more expensive than a virtual method call.

Re: [fpc-pascal] Compiler probem?

2023-11-05 Thread Sven Barth via fpc-pascal
Paul Renaud via fpc-pascal schrieb am Sa., 4. Nov. 2023, 16:18: > Hi, I have a question about some code. > > The following code segment generated a compiler error when I compiled it > with... > > fpc Sample -Se -gl -al > > but not when it's compiled with... > > fpc Sample -Se -gl > > ... > Asm >

Re: [fpc-pascal] Creating capturers

2023-11-04 Thread Sven Barth via fpc-pascal
Hairy Pixels schrieb am Sa., 4. Nov. 2023, 01:42: > > > > On Nov 3, 2023, at 8:31 PM, Sven Barth > wrote: > > > > If you need a catch all type, then you should use function references. > There is no need to invent yet another type. > > The only thing it

Re: [fpc-pascal] Creating capturers

2023-11-03 Thread Sven Barth via fpc-pascal
Hairy Pixels schrieb am Fr., 3. Nov. 2023, 12:37: > > > > On Nov 3, 2023, at 2:08 PM, Sven Barth > wrote: > > > > By default the purpose of anonymous functions assigned to function > references *is* that they can escape their scope. This will not change, > becau

Re: [fpc-pascal] Creating capturers

2023-11-03 Thread Sven Barth via fpc-pascal
Hairy Pixels schrieb am Fr., 3. Nov. 2023, 02:00: > > > > On Nov 2, 2023, at 1:44 PM, Sven Barth > wrote: > > > > Now for nested as well as anonymous routines the compiler determines > whether a capturer is required at the point that the nested or anonymous >

Re: [fpc-pascal] Creating capturers

2023-11-01 Thread Sven Barth via fpc-pascal
Am 01.11.2023 um 06:18 schrieb Hairy Pixels via fpc-pascal: I'm curious how the capturer is created in the case of anonymous functions. I know the function needs to create a capturer when nested functions are declared but what happens if there is an anonymous function which is declared in the

Re: [fpc-pascal] operator := in mode delphi?

2023-10-25 Thread Sven Barth via fpc-pascal
docs that I found that is not possible > Correct. Delphi does not support global operator overloads and not every feature that is available in FPC is made available in mode Delphi the main purpose of which is to compile Delphi code after all. Regards, Sven On 24/10/2023 23:51, Sven Barth via

Re: [fpc-pascal] operator := in mode delphi?

2023-10-24 Thread Sven Barth via fpc-pascal
Martin Frb via fpc-pascal schrieb am Di., 24. Okt. 2023, 23:30: > Is there a modeswitch to enable it? > > > Because currently I am getting an error in mode delphi. > In mode Delphi it's called "Implicit" as Delphi does not support symbolic operator overloads. Regards, Sven > __

Re: [fpc-pascal] Error: compilation raised exception internally

2023-10-21 Thread Sven Barth via fpc-pascal
Thomas Kurz via fpc-pascal schrieb am Sa., 21. Okt. 2023, 19:22: > > An exception or an internal error during compilation should *always* be > > reported. > > Please also provide a minimal, self contained example that shows the > > problem. > > This is not always trivial because the internal erro

Re: [fpc-pascal] Error: compilation raised exception internally

2023-10-21 Thread Sven Barth via fpc-pascal
Rafael Picanço via fpc-pascal schrieb am Sa., 21. Okt. 2023, 02:50: > Hi everyone, > > I am getting a strange error when compiling a project. I am really not > sure what is going on, because it occurs sometimes, consistently in some > lines of the code with calls to this static variable: > ... >

  1   2   3   4   5   6   7   8   9   10   >