[fpc-devel] Nested functions in numlib

2017-04-03 Thread Werner Pamler
In addition to the incomplete gamma function I am planning to add a series of other special functions useful for statistical calculations, among them the incomplete beta function and its inverse. Calculation of the inverse incomplete beta function usually is performed in the literature by

Re: [fpc-devel] Nested functions in numlib

2017-04-04 Thread Werner Pamler
Am 04.04.2017 um 03:28 schrieb Marco van de Voort: Did you test performance? Repeated access to parent frame in tight loops might be suboptimal. Could maybe be helped with some pointer work? Right, I should have done that before asking... Here are the results of a test running the original

[fpc-devel] Math expressions in wiki

2017-04-14 Thread Werner Pamler
Does anybody know how to write mathematical expressions in the wiki? I would like to write an article on fpc's NumLib, but I would only want to begin this activity when I know how to enter complex mathematical formulas like integrals etc such that they are displayed decently.

Re: [fpc-devel] Math expressions in wiki

2017-04-15 Thread Werner Pamler
Am 15.04.2017 um 18:59 schrieb Denis Kozlov: I think you have 2 options: 1) Write your formulates using the wiki's standard notation LaTeX, and once a Math extension is installed (if ever), your formulas will be automatically rendered. 2) Generate visual rendering of your LaTeX formulates

Re: [fpc-devel] Math expressions in wiki

2017-04-14 Thread Werner Pamler
Am 14.04.2017 um 14:49 schrieb ListMember: Apparently, the FPC wiki uses the same software as Wikipedia; if so, the following links may be useful. https://en.wikipedia.org/wiki/Wikipedia:Manual_of_Style/Mathematics#Using_HTML https://en.wikipedia.org/wiki/Wikipedia:Mathematical_symbols

Re: [fpc-devel] Math expressions in wiki

2017-04-18 Thread Werner Pamler
Am 18.04.2017 um 13:07 schrieb Marco van de Voort: Note that there is documentation, it is just Dutch and TeX (not latex but straight tex). Also, for some units the documentation sources are older than the pascal source. I know this source, I think you once had posted it in the German forum.

Re: [fpc-devel] Math and numlib

2017-03-14 Thread Werner Pamler
d with $DEFINE RUNTIME_ERRORS, terminates the program like before with a RunError(ErrCode). Am 14.03.2017 um 09:58 schrieb Marco van de Voort: In our previous episode, Werner Pamler said: is no way to check whether a value is "equal" to NaN. In math, however, there is a function IsNaN

[fpc-devel] Math and numlib

2017-03-14 Thread Werner Pamler
Hi everybody - my first post here... At the moment I am spending some time with fpc's numlib and writing a wrapper for a more versatile fitting procedure. Are there any problems to add the unit math to the uses clause of some numlib units? I want to use the value NaN (not-a-number) which is

Re: [fpc-devel] Math expressions in wiki

2017-04-14 Thread Werner Pamler
Am 14.04.2017 um 19:33 schrieb Giuliano Colla: Hope that it helps. Not really... What I was seeking is a working example for something like \sum_{n=0}^\infty \frac{x^n}{n!} My naive assumption is that I'd just have to type this phrase into the wiki text to get this formula in perfect math

Re: [fpc-devel] Math expressions in wiki

2017-04-18 Thread Werner Pamler
Am 18.04.2017 um 21:42 schrieb Vincent Snijders: I installed this extension with the default settings for size. See http://wiki.lazarus.freepascal.org/SANDBOX#Math. Thank you. Works fine in Chrome, but when I open this page in Firefox I don't see the formula, only the header "Math" :-(

Re: [fpc-devel] Math expressions in wiki

2017-04-18 Thread Werner Pamler
Am 18.04.2017 um 23:24 schrieb Tomas Hajny: Which Firefox version? SeaMonkey shows it correctly (Mozilla/5.0 (Windows NT 6.1; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0 SeaMonkey/2.46)... OK - found it: I have NoScript installed; if I remove the restrictions from the site the formulas show

Re: [fpc-devel] Math expressions in wiki

2017-04-18 Thread Werner Pamler
Am 18.04.2017 um 23:24 schrieb Tomas Hajny: On Tue, April 18, 2017 23:16, Werner Pamler wrote: Am 18.04.2017 um 21:42 schrieb Vincent Snijders: I installed this extension with the default settings for size. See http://wiki.lazarus.freepascal.org/SANDBOX#Math. Thank you. Works fine in Chrome

[fpc-devel] Avoid exception if FPHTTPClient cannot connect to server?

2017-07-31 Thread Werner Pamler
Here is a little demo program which uses fphttpclient to download some file from some server. If the URL exists everything is fine (note on Windows, that the OpenSSL dlls must be copied to the exe directory for the demo to work). If the URL does not exist, but the server responds, the program

Re: [fpc-devel] Avoid exception if FPHTTPClient cannot connect to server?

2017-07-31 Thread Werner Pamler
Agreed. This is the same situation as with string-to-number conversion: StrToFloat fires an exception if the string is not a valid float, but there's also a "TryStrToFloat" which by-passes the exception and just returns a false in case of an error. Why not having something like a "TryGet"

Re: [fpc-devel] HTML string to TFPColor

2017-07-23 Thread Werner Pamler
Another, related topic would be: Replacement of HTML entities, e.g. convert a string such as 'cmsup2/sup' to 'cm2', or 'sin + cos ' to the one with the correct greek symbols (utf8). I have a solution in TAChart, unit TAHtml, but maybe (probably...) there's a better one.

Re: [fpc-devel] HTML string to TFPColor

2017-07-23 Thread Werner Pamler
Am 23.07.2017 um 18:09 schrieb Michael Van Canneyt: This exists: function ResolveHTMLEntityReference(const Name: WideString; var Entity: WideChar): Boolean; is in unit htmldefs, fcl-xml package. Thank you. Seeking more carefully would have saved me a lot of tedious typing... Replaced my

Re: [fpc-devel] Numeric error in the calculation of Variance

2017-12-24 Thread Werner Pamler
Am 23.12.2017 um 13:24 schrieb Anton Shepelev: Hello, all May I ask you if there is any chance of fixing the error in the Math unit that I reported here: https://bugs.freepascal.org/view.php?id=32804 and provided a patch? Here is a test case: Program Vartest; uses Math; const Size =

Re: [fpc-devel] FloatHelper bugs (Issue #32837)

2018-01-12 Thread Werner Pamler
Am 12.01.2018 um 00:27 schrieb Bart: Does it (D Starter) behave "nice" alongside fpc? I have the Starter 10.1 and 10.2 running on the same machine which has also several Lazarus/fpc versions. No problems, except for scripts because Delphi merges itself into the system path so that the fpc

Re: [fpc-devel] End of support for Win XP?

2018-02-01 Thread Werner Pamler
Am 30.01.2018 um 22:40 schrieb Florian Klämpfl: Am 29.01.2018 um 21:11 schrieb Russell Davies: Hi, Just curious, does the use of SHGetKnownFolderPath() in trunk package winunits-base in fpttf.pp mean the end of Windows XP support as this function is not available in XP's shell32.dll

Re: [fpc-devel] Attn Joost: Cannot build Laz trunk with fpc fixes

2019-01-16 Thread Werner Pamler
Am 15.01.2019 um 18:08 schrieb Werner Pamler: Trying to build laz trunk (r60090) with fpc fixes (r40840) fails in (lazarus)\trunk\components\fppkg\src\fppkg_packagevariant.pas, function TFppkgNamedItemList.FindItemByName, lint 95 ("Result := nil") with the error "fppkg_packageva

[fpc-devel] Attn Joost: Cannot build Laz trunk with fpc fixes

2019-01-15 Thread Werner Pamler
Trying to build laz trunk (r60090) with fpc fixes (r40840) fails in (lazarus)\trunk\components\fppkg\src\fppkg_packagevariant.pas, function TFppkgNamedItemList.FindItemByName, lint 95 ("Result := nil") with the error "fppkg_packagevariant.pas(95,13) Error: Incompatible types: got "Pointer"

[fpc-devel] Failure to recompile TAChart after FPC r40785 (committed by Jonas)

2019-01-07 Thread Werner Pamler
FPC trunk has not been very friendly to existing code recently... Today with r40792, the TAChart package fails to recompile: "tadiagram.pas(347,38) Error: Only static methods and static variables can be referenced through an object type". The faulty code is     operator = (const A, B:

Re: [fpc-devel] Failure to recompile TAChart after FPC r40785 (committed by Jonas)

2019-01-07 Thread Werner Pamler
Am 07.01.2019 um 17:13 schrieb Sven Barth via fpc-devel: Did you try to add "static" to the TDiaPosition.Equals class function? For an object type only instance and static class methods make sense so non static class methods should probably best be forbidden. That did the trick. Thank you.

Re: [fpc-devel] Reserved words in OLE automation properties

2019-09-28 Thread Werner Pamler
Am 28.09.2019 um 19:03 schrieb Michael Van Canneyt: AShape. should do the trick, no ? Yes, thanks. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

[fpc-devel] Reserved words in OLE automation properties

2019-09-28 Thread Werner Pamler
I am porting an older Delphi project to Lazarus/FPC which analyzes the internal structure of PowerPoint files using OLE automation. While the overall program is working I am stuck with some OLE properties which have the name of Pascal keywords, e.g. Shape.*Type *or ColorEffect.*To*. FPC 3.0.4

[fpc-devel] Changes in wiki?

2019-11-28 Thread Werner Pamler
Some time ago I wrote a wiki article on our NumLib (https://wiki.lazarus.freepascal.org/NumLib_Documentation). Looking at this page again today I found that the math expressions are no longer rendered correctly by Firefox, it just displays the MathML source text, e.g.

Re: [fpc-devel] Changes in wiki?

2019-11-29 Thread Werner Pamler
Thanks to all who answered. Since nobody could reproduce the Firefox issue with the MathML expression I switched to the default Firefox profile and - alas - the expressions were rendered correctly. Therefore, I somehow must have screwed up my Firefox profile settings. Need to investigate on

Re: [fpc-devel] TEncoding.Default and default encoding for TStrings.LoadFrom*()

2020-01-02 Thread Werner Pamler
Am 02.01.2020 um 20:10 schrieb Ondrej Pokorny: TStrings.SaveTo*() writes BOM by default. Formerly the BOM was not written. There is also the problem that currently it is not possible, without further action, to retain the BOM state of a file loaded into a stringlist, modified and written

Re: [fpc-devel] TStrings and BOM

2020-01-01 Thread Werner Pamler
Am 01.01.2020 um 17:01 schrieb Ondrej Pokorny: Isn't the TStrings.WriteBOM property good enough? Why to have yet another not-very-useful overload? To be honest I think Bart's idea of making the BOM an optional parameter of the Save methods appears to me more efficient than defining a

Re: [fpc-devel] TStrings and BOM

2020-01-01 Thread Werner Pamler
Am 02.01.2020 um 00:51 schrieb Ondrej Pokorny: The WriteBOM property has a valid purpose - it is set in LoadFrom* according to the BOM presence in the loaded file. I.e. if you do: MyStrings.LoadFromFile('abc'); // WriteBOM and Encoding properties are set here MyStrings.SaveToFile('abc'); //

Re: [fpc-devel] TStrings and BOM

2020-01-01 Thread Werner Pamler
Am 02.01.2020 um 00:51 schrieb Ondrej Pokorny: The WriteBOM property has a valid purpose - it is set in LoadFrom* according to the BOM presence in the loaded file. I.e. if you do: MyStrings.LoadFromFile('abc'); // WriteBOM and Encoding properties are set here MyStrings.SaveToFile('abc'); //

Re: [fpc-devel] Console problem in Lazarus trunk

2020-07-25 Thread Werner Pamler
Am 25.07.2020 um 20:40 schrieb J. Gareth Moreton: I'm having problems in that the latest Lazarus trunk won't create a console window when I'm running the compiler source in the debugger. I have the same issue. A simple CLI program like program Project1; begin   WriteLn('Test');   ReadLn;

[fpc-devel] ftfont and FreeType

2020-07-17 Thread Werner Pamler
I am having issues in the nogui demo of TAChart with FPC 3.2.0. It uses the FCL unit ftfont and crashes at runtime with     Project noguidemo.exe raised exception class 'EInOutError' with message:     Can not load Freetype library "freetype.dll". Check your installation. This does not happen

Re: [fpc-devel] ftfont and FreeType

2020-07-17 Thread Werner Pamler
Am 17.07.2020 um 17:26 schrieb Michael Van Canneyt: It is exactly the opposite. It can now load the DLL dynamically. home:~/fpc/packages/fcl-image/src> svn log freetypeh.pp r37865 | michael | 2017-12-29 15:22:33 +0100

Re: [fpc-devel] ftfont and FreeType

2020-07-17 Thread Werner Pamler
Am 17.07.2020 um 12:30 schrieb Ondrej Pokorny: I am not 100% sure, but some freetype.dll versions can depend on zlib1.dll. I.e. you need to copy zlib1.dll to the exe directory as well. Actually I just found an info about it: https://wiki.freepascal.org/FPReport_FAQ (see Lazarus does not start

Re: [fpc-devel] ftfont and FreeType

2020-07-18 Thread Werner Pamler
Am 17.07.2020 um 23:29 schrieb Michael Van Canneyt via fpc-devel: First you'll have to explain something: Why does it break existing code according to you ? The default library name is the same in both units. Compile and run the noguidemo in the Lazarus folder components/tachart/demo/nogui. It

Re: [fpc-devel] Console problem in Lazarus trunk

2020-07-27 Thread Werner Pamler
Am 27.07.2020 um 12:57 schrieb Pascal Riekenberg: Are you sure? I use laz trunk and fpc trunk and for me the issue arises when run within the IDE without debugging. This also applies to Windows apps with option -WC. Strange... But I checked it again (with the simple WriteLn program above)

Re: [fpc-devel] compiler has problem finding right function: IfThen (Math vs. StrUtils)

2021-01-05 Thread Werner Pamler via fpc-devel
Am 05.01.2021 um 08:55 schrieb Pascal Riekenberg via fpc-devel: Since i updated my local fpc trunk some of my programs do not compile anymore. Version from before christmas was okay. The compiler can't find the function "IfThen(AValue: Boolean; const ATrue: string; const AFalse: string):

[fpc-devel] Generics-related compilation issue

2021-01-04 Thread Werner Pamler via fpc-devel
A happy, successful and healthy New Year to everybody! I have a generics related compilation issue in my package ExCtrls package (https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/components/exctrls/). This package contains a TCurrencySpinEditEx component which inherits from the

[fpc-devel] Building a debug version of FPC-main on Windows

2021-08-23 Thread Werner Pamler via fpc-devel
I am using the following script to build a debug version of FPC-main on Windows: set BINUTILS_DIR=C:\Lazarus\fpc_bootstrap_compiler\3.2.2\i386-win32 set BOOTSTRAP_COMPILER=%BINUTILS_DIR%\ppc386.exe set FPC_DEST_DIR=c:\Lazarus\fpc-main set BIN_DIR=bin\i386-win32 set

Re: [fpc-devel] Building trunk of today fails on Windows: Error: Invalid DLL C:\WINDOWS\system32\common.dll, invalid header size

2021-08-23 Thread Werner Pamler via fpc-devel
Am 23.08.2021 um 11:52 schrieb Bart via fpc-devel: Does anybody have a common.dll in \windows\system32 at all? I don't have it, neither in system32 nor in SysWOW64. Just pulled the current revision of fpc-trunk, and did not observe this error (Win 10, fpc3.2.2 32-bit bootstrap compiler)

Re: [fpc-devel] Building a debug version of FPC-main on Windows

2021-08-24 Thread Werner Pamler via fpc-devel
Am 23.08.2021 um 18:14 schrieb Marco van de Voort via fpc-devel: [...] I notice is that you point lazarus to the ppu's in the FPC source tree [...] Sorry, I don't understand: There is no Lazarus involved in my build script. If there is, show me the line and how you would modify it.

Re: [fpc-devel] Building a debug version of FPC-main on Windows

2021-08-28 Thread Werner Pamler via fpc-devel
Am 25.08.2021 um 20:53 schrieb Marco van de Voort via fpc-devel: Sorry. I'm on holiday, and I only check in occasionally at night. Try changing PP= to FPC= Thank you, Marco. Now I did already the second successful build of a older clone after an update. This really was the solution. But what is

Re: [fpc-devel] Building a debug version of FPC-main on Windows

2021-08-23 Thread Werner Pamler via fpc-devel
Am 23.08.2021 um 14:06 schrieb Marco van de Voort via fpc-devel: Op 8/23/2021 om 1:36 PM schreef Werner Pamler via fpc-devel: make install all OPT=%OPTIONS% INSTALL_PREFIX=%FPC_DEST_DIR% PP=%BOOTSTRAP_COMPILER% Shouldn't this (install all) be the other way around? Classically one builds

Re: [fpc-devel] Lazarus server back online

2021-12-31 Thread Werner Pamler via fpc-devel
https://forum.lazarus.freepascal.org/index.php/topic,57621.msg428799.html#msg428799 --> the issue occured already on Dec 24. https://forum.lazarus.freepascal.org/index.php/topic,57611.msg428693.html#msg428693 --> the issue did not yet exist on Dec 23.

Re: [fpc-devel] Overloading problem in generic class.

2022-09-18 Thread Werner Pamler via fpc-devel
Am 18.09.2022 um 14:04 schrieb Bart via fpc-devel: Werner reported that it does not compile on MacOS (64 bit) with fpc 3.3.1. Sorry if I was not precise here: I only tested with fpc 3.2.0. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org

Re: [fpc-devel] TDateTime issue.

2024-04-01 Thread Werner Pamler via fpc-devel
Am 01.04.2024 um 16:19 schrieb Marco van de Voort via fpc-devel: Op 01/04/2024 om 12:30 schreef Werner Pamler via fpc-devel: Am 31.03.2024 um 11:55 schrieb Pascal Pype via fpc-devel: There seems to be a bug in the TDateTime data type. When the time difference between two TDateTime variables

Re: [fpc-devel] TDateTime issue.

2024-04-01 Thread Werner Pamler via fpc-devel
Am 31.03.2024 um 11:55 schrieb Pascal Pype via fpc-devel: There seems to be a bug in the TDateTime data type. When the time difference between two TDateTime variables is just one millisecond, the compareDateTime function returns 0 (equality) rather than the expected -1 or 1 (different). It is

Re: [fpc-devel] TDateTime issue.

2024-04-01 Thread Werner Pamler via fpc-devel
Am 01.04.2024 um 16:19 schrieb Marco van de Voort via fpc-devel: Op 01/04/2024 om 12:30 schreef Werner Pamler via fpc-devel: Am 31.03.2024 um 11:55 schrieb Pascal Pype via fpc-devel: There seems to be a bug in the TDateTime data type. When the time difference between two TDateTime variables