Re: [fpc-pascal] FPC 3.3.x breaks the Firebird Project's Firebird.pas

2024-05-04 Thread Michael Van Canneyt via fpc-pascal
On Sat, 4 May 2024, Tony Whyman via fpc-pascal wrote: Michael, I believe that the diplomatic answer to your response is that it is "disappointing". This is a serious problem and needs to be discussed. Thank you for being diplomatic. Interfaces between modules written in

Re: [fpc-pascal] FPC 3.3.x breaks the Firebird Project's Firebird.pas

2024-05-02 Thread Michael Van Canneyt via fpc-pascal
apper class for easier access as in the above. That should not be difficult to do, and it will work in Delphi as well. The advantage is that it will be more robust against future changes as it makes no assumptions about the layout of objects. Michael. ___ f

Re: [fpc-pascal] AnsiString address changed

2024-03-18 Thread Michael Van Canneyt via fpc-pascal
be, that's the whole point of copy-on-write. As soon as one reference is changed, a copy is made if the reference count is larget than 1, and this copy is changed. Michael.___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org

Re: [fpc-pascal] AnsiString address changed

2024-03-18 Thread Michael Van Canneyt via fpc-pascal
ter itself, not the address of what S (or s1) points to. Obviously the address of the s is different of s1. What you want to do is print hexstr(pointer(s)) if you do that, you'll have the same output 3 times. Michael. ___ fpc-pascal maillist -

Re: [fpc-pascal] FP IDE sources

2024-03-14 Thread Michael Van Canneyt via fpc-pascal
. chm has some tools but IMO they are also misplaced and should be in utils. So the IDE - for me - is definitely a utility. Given the times indicated above, it would make a considerable difference to move it. Michael.___ fpc-pascal maillist - fpc

Re: [fpc-pascal] FP IDE sources

2024-03-14 Thread Michael Van Canneyt via fpc-pascal
On Thu, 14 Mar 2024, Tomas Hajny via fpc-pascal wrote: On 2024-03-14 11:06, Marco van de Voort via fpc-pascal wrote: Op 14-3-2024 om 11:04 schreef Michael Van Canneyt via fpc-pascal: To me it therefore seems a better idea to move the IDE to utils, and to have a toplevel make command

Re: [fpc-pascal] FP IDE sources

2024-03-14 Thread Michael Van Canneyt via fpc-pascal
in packages. To me it therefore seems a better idea to move the IDE to utils, and to have a toplevel make command that does the same as 'make all' simply without the utilities. Or have a 'NOUTILS=1' define. Michael.___ fpc-pascal maillist

Re: [fpc-pascal] [fcl-web] [jsonrpc] [fpjsonrpc.pp] DoCheckParamArray in TCustomJSONRPCHandler

2024-02-22 Thread Michael Van Canneyt via fpc-pascal
On Thu, 22 Feb 2024, Michael Anochin via fpc-pascal wrote: Hello, the TCustomJSONRPCHandler.DoCheckParamArray in fpjsonrpc.pp causes an exception with the message "List index (0) out of bounds". This happens, for example, if ParamArray is empty and there are not required

[fpc-pascal] [fcl-web] [jsonrpc] [fpjsonrpc.pp] DoCheckParamArray in TCustomJSONRPCHandler

2024-02-22 Thread Michael Anochin via fpc-pascal
Hello, the TCustomJSONRPCHandler.DoCheckParamArray in fpjsonrpc.pp causes an exception with the message "List index (0) out of bounds". This happens, for example, if ParamArray is empty and there are not required parameter in ParamDef (required not set). In that case ParamArray[i] not exists,

Re: [fpc-pascal] Floating point question

2024-02-19 Thread Michael Van Canneyt via fpc-pascal
to be a windows-specific problem. Here is the result of your program when executed on Linux: Const_Ans1 = 2.85714298486709594727E-0001 Var_Ans1 = 2.85714298486709594727E-0001 As you can see, the result is identifical. As for the explanation, I will have to leave that to the compiler developers. Michael

Re: [fpc-pascal] Floating point question

2024-02-17 Thread Michael Van Canneyt via fpc-pascal
. (incidentally, this is one of the reasons the FPC team does not want to make inline variables as Delphi does, since there the type will again be determined by the compiler - just as for constants, leading to ambiguity...) Michael. ___ fpc-pascal maillist

Re: [fpc-pascal] FPReport: Split text across two or more pages

2024-02-16 Thread Michael Van Canneyt via fpc-pascal
On Fri, 16 Feb 2024, Pique7 via fpc-pascal wrote: On Mon, 8 Jan 2024 22:08:16 +0100 (CET) Michael Van Canneyt via fpc-pascal wrote: On Mon, 8 Jan 2024, Pique7 via fpc-pascal wrote: Disregarding the RTF for a moment, you'd need to save the contents of the text fields in a TStringlist

Re: [fpc-pascal] Floating point question

2024-02-13 Thread Michael Van Canneyt via fpc-pascal
answer, not on every term before the calculation. As Jonas said, this would result in less efficient code, since all the math will then be done at full precision, which is slower. As usual, it is a trade-off between size (=precision) and speed. Michael

Re: [fpc-pascal] Floating point question

2024-02-12 Thread Michael Van Canneyt via fpc-pascal
of the expression on the left. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

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

2024-02-01 Thread Michael Van Canneyt via fpc-pascal
On Wed, 31 Jan 2024, Amir--- via fpc-pascal wrote: Without more info (declaration of ChildTClass, declaration of the constructor of that class etc), it is not possible to comment. We need a complete compilable code sample to provide you with more insight. Please have a look at the

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

2024-01-30 Thread Michael Van Canneyt via fpc-pascal
mment. We need a complete compilable code sample to provide you with more insight. Michael.___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

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

2024-01-22 Thread Michael Van Canneyt via fpc-pascal
')^).IntVal); Terribly convoluted code, though... Michael.___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

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

2024-01-21 Thread Michael Van Canneyt via fpc-pascal
(const name : shortstring) : pointer; This function is used internally by the streaming system (see TComponent.SetReference), so it should always work. Michael. You can use the PVmtFieldTable and PVmtFieldEntry types from the TypInfo unit: === code begin === program tfield; {$mode objfpc}{$H

Re: [fpc-pascal] IntToStr implementation

2024-01-18 Thread Michael Van Canneyt via fpc-pascal
ctual-parameter-list = "(" actual-parameter { "," actual-parameter } ")" . The compiler obviously can parse it. More accurately, I meant: you cannot write a function declaration to handle that syntax. procedure Str(O : Integer { what t

Re: [fpc-pascal] IntToStr implementation

2024-01-18 Thread Michael Van Canneyt via fpc-pascal
d implicit specialization as "standard syntax") Michael.___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Trash variables (-gt) - Translation

2024-01-17 Thread Michael Van Canneyt via fpc-pascal
r better suggestion? That seems most correct to me. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Extra linkxxx.res files left over when compiling/building project

2024-01-15 Thread Michael Van Canneyt via fpc-pascal
tool) then this file is left, it helps to examine what happened. You can delete them. Michael.___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] "Address of" question

2024-01-14 Thread Michael Van Canneyt via fpc-pascal
); This is a typecast of b from which you take the address. The typecast is superfluous. p:=@b will have the same effect. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc

Re: [fpc-pascal] Virtual methods on sealed classes

2024-01-08 Thread Michael Van Canneyt via fpc-pascal
. No optimizations are done. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] FPReport: Split text across two or more pages

2024-01-08 Thread Michael Van Canneyt via fpc-pascal
the band will behave. Michael. Thanks again for your suggestions. I haven't tried it yet but now I've got the idea. Your are so optimistic but I still fear all the things which might make troubles in a more complex report with grouping, master/detail data, calculations, layout adjustments, HTML tags

Re: [fpc-pascal] Quiz

2024-01-07 Thread Michael Van Canneyt via fpc-pascal
does not compile, although I don't see why if kr5 is accepted.. Delph does not accept it. kr7 = 1.0e+2; kr8 = 1.0 e + 2; kr8 Does not compile, probably same reason as kr6. Delphi does not accept it. Michael

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

2024-01-07 Thread Michael Van Canneyt via fpc-pascal
FPC_USE_LIBC and not are rather slim syscalls anyway, so the main bunch of Pascal code is still the same in both cases. I know this, but most likely users will not realize this... :-) Michael.___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

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

2024-01-07 Thread Michael Van Canneyt via fpc-pascal
hould also explain why linking to C has almost no effect on actual binary size. Michael.___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] RIP: Software design pioneer and Pascal creator Niklaus Wirth

2024-01-05 Thread Michael Van Canneyt via fpc-pascal
ily_medium=newsletter_content=top-article Yes, we put a short notice on the Free Pascal homepage... Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] FPReport: Split text across two or more pages

2024-01-03 Thread Michael Van Canneyt via fpc-pascal
On Tue, 2 Jan 2024, Pique7 via fpc-pascal wrote: On Tue, 2 Jan 2024 00:02:35 +0100 (CET) Michael Van Canneyt via fpc-pascal wrote: On Mon, 1 Jan 2024, Pique7 via fpc-pascal wrote: Hello everyone, I have already asked this and related questions in the Lazarus Forum. I want to improve

Re: [fpc-pascal] FPReport: Split text across two or more pages

2024-01-01 Thread Michael Van Canneyt via fpc-pascal
. I think this is perfectly doable without any changes to the original code. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] How to avoid Copy

2024-01-01 Thread Michael Van Canneyt via fpc-pascal
On Mon, 1 Jan 2024, Hairy Pixels via fpc-pascal wrote: On Dec 30, 2023, at 3:18 PM, Michael Van Canneyt via fpc-pascal wrote: And try to avoid "for r in data" because it will create a copy for each element in the list. This seems more like bad compiler design than anyth

Re: [fpc-pascal] How to avoid Copy

2023-12-31 Thread Michael Van Canneyt via fpc-pascal
no-one saw the need. Michael.___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] How to avoid Copy

2023-12-30 Thread Michael Van Canneyt via fpc-pascal
you defined TListOfMyRecord, but if it is a generic TList, better change it to a TArray or Array of TMyRecord, in which case you can use a pointer to the consecutive records in the array. Generics are convenient, but slow. Michael.___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

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

2023-12-27 Thread Michael Van Canneyt via fpc-pascal
and not something I can duplicate? Writeln() is special. You cannot duplicate it. What you can do is use WriteStr(), it has the same action as Writeln() but writes to a string instead of a file. https://www.freepascal.org/docs-html/current/rtl/system/writestr.html Michael

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

2023-12-25 Thread Michael Van Canneyt via fpc-pascal
On Mon, 25 Dec 2023, Adriaan van Os via fpc-pascal wrote: Michael Van Canneyt via fpc-pascal wrote: This is not correct either, as it suggests that ( ... ) is correct. It is not, if you use ... there must be other arguments present. That is offending the reader: "You are to s

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

2023-12-25 Thread Michael Van Canneyt via fpc-pascal
On Sun, 24 Dec 2023, Adriaan van Os via fpc-pascal wrote: Michael Van Canneyt via fpc-pascal wrote: I added univ and documented it. Something seems to have gone wrong with the defintion on page 212. Corrected, thanks. Having a better look, the rule defines just one parameter. So

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

2023-12-24 Thread Michael Van Canneyt via fpc-pascal
On Sun, 24 Dec 2023, Adriaan van Os via fpc-pascal wrote: Michael Van Canneyt via fpc-pascal wrote: The following zip file contains the updated documentation: http://downloads.freepascal.org/fpc/beta/3.2.4-rc1/docs/doc-pdf.zip Besides correcting your remarks, I did a general overhaul: - I

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

2023-12-24 Thread Michael Van Canneyt via fpc-pascal
On Sun, 17 Dec 2023, Adriaan van Os via fpc-pascal wrote: Michael Van Canneyt wrote: 32. Are the set operators "include", "exclude" missing in the syntax diagrams ? Is "><" missing (specifically) as set operator in the syntax diagrams ?

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

2023-12-24 Thread Michael Van Canneyt via fpc-pascal
On Sun, 17 Dec 2023, Adriaan van Os via fpc-pascal wrote: Michael Van Canneyt via fpc-pascal wrote: On Sat, 16 Dec 2023, Adriaan van Os via fpc-pascal wrote: More questions about the FreePascal Language Reference (version 3.2.0), part 4 34. Are macpas LEAVE and CYCLE statements

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

2023-12-24 Thread Michael Van Canneyt via fpc-pascal
; var theFoundIndex : Int32): boolean; But this kind of procedural parameter doesn't seem to be included in the rule for . it is allowed in macpas and iso modes. I added univ and documented it. Michael. ___ fpc-pascal maillist - fpc

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

2023-12-24 Thread Michael Van Canneyt via fpc-pascal
d. Added to the diagrams. I changed the diagram to be more clear (hopefully). Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

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

2023-12-24 Thread Michael Van Canneyt via fpc-pascal
On Sun, 17 Dec 2023, Adriaan van Os via fpc-pascal wrote: Michael Van Canneyt via fpc-pascal wrote: 37. Shouldn't the macpas "mwpascal" modifier be added to ? call-modifiers = "register" | "cdecl" | "pascal" | "stdcall" | "

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

2023-12-24 Thread Michael Van Canneyt via fpc-pascal
On Sun, 17 Dec 2023, Adriaan van Os via fpc-pascal wrote: Michael Van Canneyt via fpc-pascal wrote: 28. The documentation for macpas "UNIV" is missing ? I have no idea what this is ? UNIV is macpas specific (as mentioned in Appendix D.6 of the Programmer's Manual) Thank

Re: [fpc-pascal] Double finalize

2023-12-20 Thread Michael Van Canneyt via fpc-pascal
$$_TMANAGEDOBJECT,%rsi leaq-96(%rbp),%rdi callfpc_finalize movl-92(%rbp),%eax Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

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

2023-12-16 Thread Michael Van Canneyt via fpc-pascal
m to be referenced anywhere in the syntax, so it may have to be added to the rule ? To the library rule, but also to the unit rule, because it can also appear in a unit... 40. < recordoperator-definition> = ? Yes. 41. Is it correct that

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

2023-12-16 Thread Michael Van Canneyt via fpc-pascal
On Sat, 16 Dec 2023, Wayne Sherman wrote: On Sat, Dec 16, 2023 at 7:35 AM Michael Van Canneyt wrote: Hm. Lot of corrections to do.. I'll be busy tonight :-) Are these grammars in GIT so others can help by submitting merge requests? That way you can spread the love :-) Everything

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

2023-12-16 Thread Michael Van Canneyt via fpc-pascal
ule, stopping The missing >< is an oversight 33. Section 12.1 gives "sign" in boldface in the rule for , suggesting that it is a keyword. Is that correct ? No. It is not a keyword, but one of '+' or '-'. Hm. Lot of corrections to do.. I'll be busy tonight :-) Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

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

2023-12-16 Thread Michael Van Canneyt via fpc-pascal
25. Section 16.2 defines a rule that refers to a rule interface-part = "INTERFACE" [ uses-clause ] { constant-declaration-part | type-declaration-part | variable-declaration-part | property-declaration-part | procedure-headers-part } . I can't find the rule . What is it ?

Re: [fpc-pascal] More syntax questions (and more to follow)

2023-12-16 Thread Michael Van Canneyt via fpc-pascal
On Sat, 16 Dec 2023, Adriaan van Os via fpc-pascal wrote: Michael Van Canneyt via fpc-pascal wrote: Thanks for the replies. Please note that the syntax diagrams are NOT meant to be exhaustive. They are an aid to explain the syntax. I strive to make them as correct as possible

Re: [fpc-pascal] More syntax questions (and more to follow)

2023-12-16 Thread Michael Van Canneyt via fpc-pascal
d me deficiencies of the text. I have corrected what could be done quickly. For the typed constants I need some time to correct/add them, since I need to provide some explanatory text. Please note that the syntax diagrams are NOT meant to be exhaustive. They are an aid to explain the syntax. I

Re: [fpc-pascal] case statement

2023-12-16 Thread Michael Van Canneyt via fpc-pascal
On Fri, 15 Dec 2023, Adriaan van Os wrote: Michael Van Canneyt via fpc-pascal wrote: The fact that the semicolon before the else is optional ? I don't see a semicolon in the formal syntax. This works: OK, than an optional semicolon must be added to the rule exceptionhandlers

Re: [fpc-pascal] method-definition

2023-12-16 Thread Michael Van Canneyt via fpc-pascal
required. In my opinion this is superfluous, but embarcadero decided otherwise. 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 Sven Barth should answer

Re: [fpc-pascal] case statement

2023-12-15 Thread Michael Van Canneyt via fpc-pascal
On Fri, 15 Dec 2023, Adriaan van Os via fpc-pascal wrote: Michael Van Canneyt via fpc-pascal wrote: On Fri, 15 Dec 2023, Adriaan van Os via fpc-pascal wrote: Note that the same ambiguity exists in the syntax (and this is less well known) exceptionhandlers = [ exception-handler

Re: [fpc-pascal] case statement

2023-12-15 Thread Michael Van Canneyt via fpc-pascal
. exception-handler = "ON" [ identifier ":" ] class-type-identifier "DO" statement . as ends with a and the optional <"ELSE" statement-list> part start with "ELSE". Sloppy language design, I assume by Borland. What exactly do you consider &q

Re: [fpc-pascal] implementation-part

2023-12-14 Thread Michael Van Canneyt via fpc-pascal
al declarations. Really ? Not being a macpas user, I was not aware of this. I will update the documentation. Thank you for pointing it out. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailm

Re: [fpc-pascal] case statement

2023-12-14 Thread Michael Van Canneyt via fpc-pascal
and I feel that at least the Language Reference should warn against it. A good point. I will add a warning. Even with an obliged semicolon, I always use "OTHERWISE instead of ELSE, but that's my personal preference. Indeed. By contrast I abhorr the OTHERWISE. Tastes differ. Thanks

Re: [fpc-pascal] Question regarding building fpc from sources

2023-11-30 Thread Michael Van Canneyt via fpc-pascal
es a 'clean' source tree, 'make sourceinstall' does a clean first. So you should not do this as long as the compiler binary has not been moved somewhere else. (the make install normally does this). Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

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

2023-11-19 Thread Michael Van Canneyt via fpc-pascal
c:a\b Michael.___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

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

2023-11-19 Thread Michael Van Canneyt via fpc-pascal
On Sun, 19 Nov 2023, Bart via fpc-pascal wrote: On Sun, Nov 19, 2023 at 2:31 PM Michael Van Canneyt via fpc-pascal wrote: > This raises the question what the result of > TPath.Combine(['a','\b',c'','\d','e']) would be (I would then expect > either \b\c or \d\

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

2023-11-19 Thread Michael Van Canneyt via fpc-pascal
On Sun, 19 Nov 2023, Bart via fpc-pascal wrote: On Sun, Nov 19, 2023 at 12:59 PM Michael Van Canneyt via fpc-pascal wrote: The output is in linux.txt and windows.txt Thanks for testing. It seems that it'll pick the last absolute path it finds, not the first one in the argument list

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

2023-11-19 Thread Michael Van Canneyt via fpc-pascal
elements version of the call. Seems to me you can simply repeatedly call the 2 path version from back to front. If I need to do more tests, let me know. Michael.___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi

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

2023-11-19 Thread Michael Van Canneyt via fpc-pascal
and windows.txt From what I can see all characters with ascii code < 32 are invalid. For windows additionally, the > " < and | characters are invalid. This is for paths only. I didn't test filename characters. Michael.<> ___ fpc-pascal mai

Re: [fpc-pascal] fcl-web websocket

2023-11-09 Thread Michael Van Canneyt via fpc-pascal
it in the issue tracker and attach a sample console program that shows the issue. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Difference between string and Tbytes as procedure arguments?

2023-11-05 Thread Michael Van Canneyt via fpc-pascal
On Sun, 5 Nov 2023, Bo Berglund via fpc-pascal wrote: You must copy the data. The copy() function can be used for this. Follow-up question: Can I change the function declaration like this and preserve the content? function TSSConnection.ParseCmdFileData(var SSCmdFile: TSSCommandFile;

Re: [fpc-pascal] Difference between string and Tbytes as procedure arguments?

2023-11-05 Thread Michael Van Canneyt via fpc-pascal
reference counting added to the mix. Is there a way to simply tell Delphi/FreePascal to treat also TBytes as copy rather than a pointer to the real data? You must copy the data. The copy() function can be used for this. Michael. ___ fpc-pascal

Re: [fpc-pascal] fcl-pdf custom font from memstream

2023-11-02 Thread Michael Van Canneyt via fpc-pascal
On Thu, 2 Nov 2023, Mattias Gaertner via fpc-pascal wrote: On 02.11.23 14:00, Michael Van Canneyt via fpc-pascal wrote: On Thu, 2 Nov 2023, Alexey Torgashin via fpc-pascal wrote: How to load a custom font from a stream instead of from a file? Currently no way to my knowledge

Re: [fpc-pascal] fcl-pdf custom font from memstream

2023-11-02 Thread Michael Van Canneyt via fpc-pascal
LoadFromFile(const AFileName : String); Procedure LoadFromStream(AStream: TStream); virtual; Yes, but the font cache/manager in fpttf does not support this, and all font access happens through the font cache. (at least that is how I understood Mattias' request) Michael

Re: [fpc-pascal] fcl-pdf custom font from memstream

2023-11-02 Thread Michael Van Canneyt via fpc-pascal
On Thu, 2 Nov 2023, Mattias Gaertner via fpc-pascal wrote: Hi, How to load a custom font from a stream instead of from a file? Currently no way to my knowledge, but I am open for patches ! Michael. ___ fpc-pascal maillist - fpc-pascal

Re: [fpc-pascal] IDispatch with Variant is not working on Linux. Why?

2023-11-01 Thread Michael Van Canneyt via fpc-pascal
grateful if you donate it, it would be useful for all FPC users ! Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] IDispatch with Variant is not working on Linux. Why?

2023-11-01 Thread Michael Van Canneyt via fpc-pascal
is included, and this is only included on windows. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] [Lazarus] Running FPC in the browser...

2023-10-29 Thread Michael Van Canneyt via fpc-pascal
On Sat, 28 Oct 2023, Wayne Sherman via fpc-pascal wrote: On Sun, Oct 22, 2023 at 3:20 AM Michael Van Canneyt wrote: Thanks to the efforts of Nikolay Nikolov, the FPC compiler can now recompile itself to webassembly I just watched an interesting talk from StrangeLoop called: "I

[fpc-pascal] Running FPC in the browser...

2023-10-22 Thread Michael Van Canneyt via fpc-pascal
in the browser. No doubt, other possibilities will come to mind. Stay tuned for more goodies from the FPC team :-) 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 ?

2023-10-16 Thread Michael Van Canneyt via fpc-pascal
, not dogma. Michael.___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] What is webasssembly?

2023-10-12 Thread Michael Van Canneyt via fpc-pascal
On Wed, 11 Oct 2023, Steve Litt via fpc-pascal wrote: 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

Re: [fpc-pascal] All methods vitrual ?

2023-10-11 Thread Michael Van Canneyt via fpc-pascal
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

Re: [fpc-pascal] All methods vitrual ?

2023-10-11 Thread Michael Van Canneyt via fpc-pascal
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] What is webasssembly?

2023-10-11 Thread Michael Van Canneyt via fpc-pascal
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. Michael

Re: [fpc-pascal] All methods vitrual ?

2023-10-10 Thread Michael Van Canneyt via fpc-pascal
ve several programs that do this. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] fpc webassembly and node

2023-10-09 Thread Michael Van Canneyt via fpc-pascal
On Mon, 9 Oct 2023, Michael Van Canneyt via fpc-pascal wrote: Hello, Either list is fine. This should compile and work. I'm using webassembly and classes quite a lot, even with threading, so I see no reason why this simple code should not run. How did you start the webassembly ? How

Re: [fpc-pascal] fpc webassembly and node

2023-10-09 Thread Michael Van Canneyt via fpc-pascal
pas2js to start it ? What browser did you test ? Michael. On Sun, 8 Oct 2023, k1 via fpc-pascal wrote: Hi guys, i have a question concerning webassembly, please let me know if this is the wrong list. is it possible to use classes and compile to webassemly, the following code is working well

Re: [fpc-pascal] Issue #39746 fpwidestring case conversion string too long

2023-09-27 Thread Michael Van Canneyt via fpc-pascal
think that is easily doable. I'll look at applying the RTL patches separately next week if no-one did it before. It would help if there was a testcase for the compiler. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https

Re: [fpc-pascal] Closure hangs compiler

2023-09-24 Thread Michael Van Canneyt via fpc-pascal
On Sun, 24 Sep 2023, Hairy Pixels via fpc-pascal wrote: This program hangs during compiling. Does this happen to you too? I can confirm. Please create a bugreport. Michael. === Free Pascal Compiler version 3.3.1 [2023/03/03

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

2023-09-11 Thread Michael Van Canneyt via fpc-pascal
ail to see what's still the problem ? Functions GetTextAutoFlush and SetTextAutoFlush were added to control the behaviour. So, original poster can set behaviour as he wants it, and the issue is closed. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Visual studio code

2023-08-11 Thread Michael Van Canneyt via fpc-pascal
it worked. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Pointer question

2023-08-10 Thread Michael Van Canneyt via fpc-pascal
); Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Pointer question

2023-08-10 Thread Michael Van Canneyt via fpc-pascal
clear code. Here's a question, what is the full list of possible pointer operators? I didn't even know about pointer - pointer until now and there may be more. https://www.freepascal.org/docs-html/current/ref/refse15.html#x42-620003.4 Michael. ___ fpc

Re: [fpc-pascal] TStringHelper not found

2023-07-24 Thread Michael Van Canneyt via fpc-pascal
On Mon, 24 Jul 2023, Rafael Picanço via fpc-pascal wrote: I just updated to trunk (Lazarus 3.99 4ed7ff9b1c, FPC 3.3.1-13378-gceddc2aec3) and I am getting an "Identifier not found" error for TStringHelper: I introduced an alias. Michael._

Re: [fpc-pascal] Documentation or compiler bug?

2023-07-08 Thread Michael Van Canneyt via fpc-pascal
On Sat, 8 Jul 2023, Michael Van Canneyt via fpc-pascal wrote: On Sat, 8 Jul 2023, Hairy Pixels via fpc-pascal wrote: In fact I filed a bug today which was related. Notice how I didn't use cdecl in the program but another user tried to compile and had problems with cdecl also. https

Re: [fpc-pascal] Documentation or compiler bug?

2023-07-08 Thread Michael Van Canneyt via fpc-pascal
printf(format: PChar): Integer; cdecl; external; varargs; begin printf('%d is the answer'#10,42) end. Will work and will print 42 is the answer Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/m

Re: [fpc-pascal] Documentation or compiler bug?

2023-07-08 Thread Michael Van Canneyt via fpc-pascal
would be helpful if you would give the exact statement you are writing. Michael.___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] reverse for in loop

2023-07-07 Thread Michael Van Canneyt via fpc-pascal
On Fri, 7 Jul 2023, Zamrony P. Juhara via fpc-pascal wrote: I like simplicity for .. in .. loop. but is there equivalent for reverse loop? If you code your enumerator so then yes. For standard types there is none. Michael. ___ fpc-pascal

Re: [fpc-pascal] Pchar from constant string

2023-06-30 Thread Michael Van Canneyt via fpc-pascal
On Fri, 30 Jun 2023, 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

Re: [fpc-pascal] Pchar from constant string

2023-06-30 Thread Michael Van Canneyt via fpc-pascal
]=#0); and it will print TRUE. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Pchar from constant string

2023-06-29 Thread Michael Van Canneyt via fpc-pascal
--- Just as it is for a shortstring and ansistring: --- # [6] s:='456'; .ascii "\003456\000" .Le12: .size _$PROGRAM$_Ld2, .Le12 - _$PROGRAM$_Ld2 --- Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.fr

Re: [fpc-pascal] Microsoft SAPI on Freepascal

2023-06-27 Thread Michael Van Canneyt via fpc-pascal
:= CreateOLEObject('SAPI.SpVoice') and Voice.Speak('I am speaking.', 0) to work on Linux? I know soundon and soundoff don't work with Linux. comobj and everything COM related is windows specific. So this will never work on linux. The technology that comes closest on Linux is DBUS. Michael

Re: [fpc-pascal] Microsoft SAPI on Freepascal

2023-06-26 Thread Michael Van Canneyt via fpc-pascal
On Mon, 26 Jun 2023, Marco van de Voort via fpc-pascal wrote: On 26-6-2023 20:26, Michael Van Canneyt via fpc-pascal wrote: I suspect COM is not properly initialized, and that Lazarus does this for you. (it needs com for some components on windows) So, try adding unit windows

Re: [fpc-pascal] Microsoft SAPI on Freepascal

2023-06-26 Thread Michael Van Canneyt via fpc-pascal
On Mon, 26 Jun 2023, Michael Van Canneyt via fpc-pascal wrote: On Mon, 26 Jun 2023, James Richters wrote: I tried to make your example into a FPC program without Lazarus: {$mode objfpc}{$H+} uses comobj; var SavedCW: Word; v: OleVariant; begin v:=CreateOleObject('SAPI.SpVoice

Re: [fpc-pascal] Microsoft SAPI on Freepascal

2023-06-26 Thread Michael Van Canneyt via fpc-pascal
is for you. (it needs com for some components on windows) So, try adding unit windows to the uses clause and add CoInitialize(nil); as the first statement of your program. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.free

Re: [fpc-pascal] Microsoft SAPI on Freepascal

2023-06-26 Thread Michael Van Canneyt via fpc-pascal
changing the selected voice to 0 instead of 1. Michael.___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

  1   2   3   4   5   6   7   8   9   10   >