Re: [fpc-pascal] All methods vitrual ?
Sven Barth via fpc-pascal wrote: Ah, yes, only classes and interfaces can be used for published fields. For properties anything is allowed. However, what makes the whole thing unuseable is that with {$M-} the compiler doesn't accept "published". So, without using macros, the same source code can not be compiled with both {$M+} and {$M-}. That is really clumsy. With {$M-} "published" (or some other visibility specifier) should be equal to "public". Regards, Adriaan van Os ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] All methods vitrual ?
On Wed, 11 Oct 2023, Adriaan van Os via fpc-pascal wrote: Sven Barth via fpc-pascal wrote: Ah, yes, only classes and interfaces can be used for published fields. For properties anything is allowed. However, what makes the whole thing unuseable is that with {$M-} the compiler doesn't accept "published". So, without using macros, the same source code can not be compiled with both {$M+} and {$M-}. That is really clumsy. With {$M-} "published" (or some other visibility specifier) should be equal to "public". Of course not. $M controls the inclusion of RTTI, i.e. it allows or disallows the use of the published section. No more, no less. It has no impact on the other visibilities whatsoever. And that will not change, if only for Delphi compatibility. If this is not acceptable, then you will need to wait for the extended RTTI or use fcl-passrc to solve your need. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] All methods vitrual ?
Michael Van Canneyt via fpc-pascal wrote: $M controls the inclusion of RTTI, i.e. it allows or disallows the use of the published section. No more, no less. I don't see any use in allowing or disallowing something. And with the current design, it is, as I said, impossible, without macros, to compile the same code with {$M+} and {$M-}. It has no impact on the other visibilities whatsoever. And that will not change, if only for Delphi compatibility. Adding a visibility specifier "visible" meaning "published" with {$M+} and "public" with {$M-} doesn't degrade Delphi compatibility. Anyway, I did that now for my source code with macros, but it's clumsy. If this is not acceptable, then you will need to wait for the extended RTTI or use fcl-passrc to solve your need. I tried fcl-passrc but it didn't produce anything but crashes. I much welcome the extended RTTI. Keep up the good work. Regards, Adriaan van Os ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] All methods vitrual ?
On Wed, 11 Oct 2023, Adriaan van Os via fpc-pascal wrote: Michael Van Canneyt via fpc-pascal wrote: $M controls the inclusion of RTTI, i.e. it allows or disallows the use of the published section. No more, no less. I don't see any use in allowing or disallowing something. And with the current design, it is, as I said, impossible, without macros, to compile the same code with {$M+} and {$M-}. While I agree with your statement about allowing/disallowing use of 'published' based on a directive, we inherited this from Delphi and it is a very basic part of the language & RTL, so changing it is simply not an option. The extended RTTI is meant to remedy this (also in Delphi), but IMO it introduces its own problems (you'll love the amount of compiler directives it needs ;)). I'm surprised to hear about your failure to get fcl-passrc to work, since it is used to create the docs based on the fpc sources. Additionally it forms the basis of pas2js, which fully supports all FPC constructs. That said, I realize the (correct) use of fcl-passrc may be a bit hermetic... Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] All methods vitrual ?
On 11/10/2023 16:46, Adriaan van Os via fpc-pascal wrote: I don't see any use in allowing or disallowing something. And with the current design, it is, as I said, impossible, without macros, to compile the same code with {$M+} and {$M-}. Use $IfOpt instead of macros? {$IfOpt M+} published {$Else} public {$EndIf} ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] What is webasssembly?
Michael Van Canneyt via fpc-pascal said on Wed, 11 Oct 2023 08:27:35 +0200 (CEST) >On Tue, 10 Oct 2023, Steve Litt via fpc-pascal wrote: > >> What is webasssembly? > >A bytecode format (similar to what is used in Java and C# runtimes) >which is an open standard and which runs in all major browsers or in a >host application. Does this mean I can code an application in Pascal and use webassembly to turn it into a web application? If so, could you please point me to some simple examples? Thanks, SteveT Steve Litt Autumn 2023 featured book: Rapid Learning for the 21st Century http://www.troubleshooters.com/rl21 ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal