Re: [fpc-pascal] type helpers

2019-01-11 Thread Sven Barth via fpc-pascal
Am Fr., 11. Jan. 2019, 11:24 hat Mattias Gaertner via fpc-pascal < fpc-pascal@lists.freepascal.org> geschrieben: > Hi, > > A type helper can change Self. > I wondered how FPC 3.3.1 handles properties and got some > unexpected results. Is this by design, a bug, or not-yet-implemented? > > {$mode

Re: [fpc-pascal] type helpers

2019-01-11 Thread Sven Barth via fpc-pascal
Am Fr., 11. Jan. 2019, 14:52 hat Mattias Gaertner via fpc-pascal < fpc-pascal@lists.freepascal.org> geschrieben: > On Fri, 11 Jan 2019 14:27:13 +0100 > Sven Barth via fpc-pascal wrote: > > >[...] > > This is by design. In this case DoIt is called on a temp variable &

Re: [fpc-pascal] inlining functions

2019-01-12 Thread Sven Barth via fpc-pascal
Am Sa., 12. Jan. 2019, 13:05 hat denisgolovan geschrieben: > > However, what you actually can do, is manually recompile all units of > your program > > multiple times. While this won't help with inline functions called > > before they are parsed in those same units, it will allow inlining of > >

Re: [fpc-pascal] Constants in generics

2019-01-09 Thread Sven Barth via fpc-pascal
Am Mi., 9. Jan. 2019, 17:03 hat Ryan Joseph geschrieben: > > > > On Jan 8, 2019, at 3:49 PM, Benito van der Zander > wrote: > > > > that reminds me of https://bugs.freepascal.org/view.php?id=34232 > > In this case maybe generics should just not give range errors unless > they’re specialized?

Re: [fpc-pascal] SetLength warnings - request

2019-01-02 Thread Sven Barth via fpc-pascal
Am Mi., 2. Jan. 2019, 17:05 hat Benito van der Zander geschrieben: > The non-initialization of 'Result' has bitten me more than once in Delphi. > > > Me, too. Usually the solution was to add a call to SetLength. > > That makes the bullshit hints especially bad. > Even in Delphi situations can

Re: [fpc-pascal] Constants in generics

2019-01-02 Thread Sven Barth via fpc-pascal
Am Mi., 2. Jan. 2019, 11:20 hat denisgolovan geschrieben: > Hi, all > > Could someone confirm this functionality is merged into trunk? I mean > constants in generics. > I can confirm that it is not integrated in trunk. Regards, Sven ___ fpc-pascal

Re: [fpc-pascal] Concatenating CP Strings

2018-09-16 Thread Sven Barth via fpc-pascal
On 9/15/18 10:12 PM, Martok wrote: > And another one: > > var > f: TextFile; > s: string; > begin > AssignFile(f, 'a_file.txt'); > SetTextCodePage(f, 866); > Reset(f); > ReadLn(f, s); > WriteLn(StringCodePage(s)); > readln; > end. > > That is rather useless... No, it is not. The

Re: [fpc-pascal] Concatenating CP Strings

2018-09-16 Thread Sven Barth via fpc-pascal
On 9/15/18 1:38 AM, Martok wrote: > Hi all, > > concatenating codepage strings is documented to be a bit weird: > > > Knowing this, how does one achieve the following? > > - have a string in any dynamic codepage > - append

Re: [fpc-pascal] "No debugger support" in FPC3.0.4 for DOS (go32v2)

2018-09-17 Thread Sven Barth via fpc-pascal
schrieb am Mo., 17. Sep. 2018, 08:11: > I downloaded "dos304full" and did the install. But trying to debug results > in "No debugger support available" > I looked into the sourcecode of the IDE and discovert that the IDE > included > in the downloaded DOS304FULL.zip must have been compiled with

Re: [fpc-pascal] seeing messages?

2018-09-17 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Mo., 17. Sep. 2018, 09:46: > I haven’t got a reply in days to some questions I had in the "with in > classes/records” thread, which is unusual. Are people seeing my messages? > Just wanted to make sure the messages aren’t getting lost. > If your last message is the one

Re: [fpc-pascal] Candidate for crowd-funding

2018-12-19 Thread Sven Barth via fpc-pascal
Am Mi., 19. Dez. 2018, 09:03 hat denisgolovan geschrieben: > My personal wish-list is: > - support for array calculations / automatic loop parallelization via SSE, > AVX, etc. > Both static and dynamic arrays should supported. > Once implemented vector operations on arrays (ala APL) might be

Re: [fpc-pascal] Candidate for crowd-funding

2018-12-19 Thread Sven Barth via fpc-pascal
Am Mi., 19. Dez. 2018, 13:18 hat Ryan Joseph geschrieben: > > > > On Dec 19, 2018, at 6:35 PM, Ryan Joseph > wrote: > > > > How does that work? I’ve been interested in coroutines for a while now > but I don’t understand how they function in the language. They would need > to manage stack states

Re: [fpc-pascal] Candidate for crowd-funding

2018-12-19 Thread Sven Barth via fpc-pascal
Am Mi., 19. Dez. 2018, 11:38 hat Martok geschrieben: > > The main problem here is to model what registers an instruction uses and > > modifies so that the register allocator of the surrounding function can > take > > that into account accordingly... Maybe as a first step we could allow in >

Re: [fpc-pascal] trying to use C code in .pas on WIN32

2019-01-24 Thread Sven Barth via fpc-pascal
Am Fr., 25. Jan. 2019, 01:01 hat Marc Santhoff geschrieben: > On Wed, 2019-01-23 at 14:30 -0700, conlin664 via fpc-pascal wrote: > > I've done research, but am just missing something. > > my .pas code links just fine, but doesn't RUN. > > ( first writeln never appears ) > > If I remove the

Re: [fpc-pascal] Compile for WinCE 7, target ARM, CPU Cortex-A9

2019-04-05 Thread Sven Barth via fpc-pascal
LacaK schrieb am Fr., 5. Apr. 2019, 13:18: > > > Note that you probably don't need two different cross compilers if your > cpu-OS target is the same > > Target CPU family is same: "arm", but Target processor is not the same: > "ARMv4" versus "ARMv7" ... > > So I do not know if this requires two

Re: [fpc-pascal] Compile for WinCE 7, target ARM, CPU Cortex-A9

2019-04-05 Thread Sven Barth via fpc-pascal
LacaK schrieb am Fr., 5. Apr. 2019, 14:56: > > >> >> Note that you probably don't need two different cross compilers if your >> cpu-OS target is the same >> >> Target CPU family is same: "arm", but Target processor is not the same: >> "ARMv4" versus "ARMv7" ... >> >> So I do not know if this

Re: [fpc-pascal] Using TInterfaceList and casting interfaces

2019-04-07 Thread Sven Barth via fpc-pascal
Benito van der Zander schrieb am So., 7. Apr. 2019, 15:34: > Writing (list.get(0) as ISomeInterface), is very slow and not possible, > when the interface has no GUID. > This is indeed what is supposed to be used with TInterfaceList. Or perhaps it is better to use gvector rather than

Re: [fpc-pascal] fpdoc: what does the --marco parameter do?

2019-03-23 Thread Sven Barth via fpc-pascal
Graeme Geldenhuys schrieb am Sa., 23. März 2019, 17:40: > On 23/03/2019 16:34, Graeme Geldenhuys wrote: > > I'm trying to debug fpdoc, but for the life of me, I can't get Lazarus > > to step into the code other than the program unit's main code block. > > Got this part sorted - MSEide to the

Re: [fpc-pascal] Multi helpers

2019-02-25 Thread Sven Barth via fpc-pascal
Mattias Gaertner via fpc-pascal schrieb am Mo., 25. Feb. 2019, 19:09: > On Mon, 25 Feb 2019 12:49:16 -0500 > Ryan Joseph wrote: > > > > On Feb 25, 2019, at 12:41 PM, Mattias Gaertner via fpc-pascal > > > wrote: > > > > > > At least FPC helpers are more consistent than Delphi. > > > inherited

Re: [fpc-pascal] Multi helpers

2019-02-25 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Mo., 25. Feb. 2019, 19:00: > Question, is this mode switch allowed in Delphi mode? I disabled it > because I had a comment that said it was ObjFPC mode only but that doesn’t > make sense it couldn’t be enabled manually even in Delphi mode. > Mattias already answered, but

Re: [fpc-pascal] Multi helpers

2019-02-25 Thread Sven Barth via fpc-pascal
Am 25.02.2019 um 19:44 schrieb Sven Barth: Mattias Gaertner via fpc-pascal > schrieb am Mo., 25. Feb. 2019, 19:09: On Mon, 25 Feb 2019 12:49:16 -0500 Ryan Joseph mailto:r...@thealchemistguild.com>> wrote: > > On Feb 25, 2019, at 12:41 PM,

Re: [fpc-pascal] Multi helpers

2019-02-28 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Do., 28. Feb. 2019, 15:37: > > > > On Feb 28, 2019, at 1:51 AM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > Yes, though the first step should probably be to rework your commits. > It's a bit of work, but

Re: [fpc-pascal] CGI with datamodule does not work

2019-02-26 Thread Sven Barth via fpc-pascal
Am 27.02.2019 um 01:42 schrieb AB: Hi Guys, I have tried to update my old web project that is in maintenance mode since a few years now, using the latest stable Lazarus/FPC, and fcl-web just does not want to work (Tried Lazarus 1.8.4/FPC 3.0.4, Lazarus 2.0.0/FPC 3.0.4 with Apache 2.4, on

Re: [fpc-pascal] Multi helpers

2019-02-27 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Do., 28. Feb. 2019, 03:50: > posts getting blocked again, just sending this to see if it gets through. > > > On Feb 26, 2019, at 9:10 AM, Ryan Joseph > wrote: > > > > > > > >> On Feb 26, 2019, at 7:05 AM, Graeme Geldenhuys < > mailingli...@geldenhuys.co.uk> wrote: > >> >

Re: [fpc-pascal] Registers used by calling conventions

2019-03-09 Thread Sven Barth via fpc-pascal
Anthony Walter schrieb am Fr., 8. März 2019, 22:34: > What registers are used by default calling convention and where can I find > more information about Free Pascal asm details? > > When writing code using the asm block on Delphi in Windows, the default > calling convention (fastcall) would

Re: [fpc-pascal] FGL.TFPSList Find method needed (binary search)

2019-02-16 Thread Sven Barth via fpc-pascal
Am Sa., 16. Feb. 2019, 21:30 hat AlexeyT geschrieben: > Hello. Can you pls, add Sorted property to TFPSList / TFPGList (Add() > method must sort newly added item), and also Find method (which must use > binary search in Sorted case, and use plain loop if not sorted) > You could also check

Re: [fpc-pascal] Constants in generics tests

2019-02-16 Thread Sven Barth via fpc-pascal
Am Sa., 16. Feb. 2019, 15:34 hat Ryan Joseph geschrieben: > > > > On Feb 16, 2019, at 3:33 AM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > While you're at it, you should probably also ensure that internal error > 2014050904

Re: [fpc-pascal] Question: Is there a global callback, when a thread gets terminated?

2019-02-12 Thread Sven Barth via fpc-pascal
Am Di., 12. Feb. 2019, 16:56 hat Marc Santhoff geschrieben: > On Mon, 2019-02-11 at 10:21 +, Michael Schnell wrote: > > > Yes, but how do I get notified, when the thread is gone, and I can free > > > the > > > memory (of the object that was created)? > > > > Ah, now I finally see the problem

Re: [fpc-pascal] StrUtils unit needs Widestring funcs

2019-02-15 Thread Sven Barth via fpc-pascal
Am Fr., 15. Feb. 2019, 18:54 hat Michael Van Canneyt geschrieben: > > I intend to copy it to ustrutils, which will be compiled with widestrings. > Copying all routines to handle ansi/wide string is no solution. > I hope you mean UnicodeString? The only platform where this is important is

Re: [fpc-pascal] Constants in generics tests

2019-02-15 Thread Sven Barth via fpc-pascal
Am Fr., 15. Feb. 2019, 20:58 hat Ryan Joseph geschrieben: > > > > On Feb 15, 2019, at 2:11 PM, Ryan Joseph > wrote: > > > > Also I just noticed that I’m getting warnings from the “U” constant > which is declared in the “strict private” section (Private const > "TTest$1.U" never used). That

Re: [fpc-pascal] Constants in generics tests

2019-02-15 Thread Sven Barth via fpc-pascal
Am Fr., 15. Feb. 2019, 21:54 hat Ryan Joseph geschrieben: > > > > On Feb 15, 2019, at 2:11 PM, Ryan Joseph > wrote: > > > > Something with class functions in particular. Very strange it can’t find > the declaration. So never mind about submitting, I need to fix this now. :) > > I just looked

Re: [fpc-pascal] Constants in generics tests

2019-02-16 Thread Sven Barth via fpc-pascal
Am 15.02.2019 um 23:00 schrieb Ryan Joseph: On Feb 15, 2019, at 4:19 PM, Sven Barth via fpc-pascal wrote: It could be that the method body is not generated. Look for generate_specialization_procs in pgenutil as that is what generates the bodies at the end of a unit (simplified). Really

Re: [fpc-pascal] trying to use C code in .pas on WIN32

2019-01-31 Thread Sven Barth via fpc-pascal
Am Do., 31. Jan. 2019, 22:03 hat Marc Santhoff geschrieben: > On Thu, 2019-01-31 at 11:00 -0700, conlin664 via fpc-pascal wrote: > > sven, > > > > so I just tried, what I think you said: > > > > procedure HelloC; cdecl; external name 'HelloC'; > > > > pcode.pas(19,1) Error: Undefined symbol:

Re: [fpc-pascal] trying to use C code in .pas on WIN32

2019-01-30 Thread Sven Barth via fpc-pascal
Am 30.01.2019 um 23:14 schrieb conlin664 via fpc-pascal: ok. I backed up to a simple version. how I declare the C routine must be the problem, with nothing, procedure HelloC; cdecl; external; I think it's trying to static link it, and gets an pcode.pas(19,1) Error: Undefined symbol:

Re: [fpc-pascal] trying to use C code in .pas on WIN32

2019-01-31 Thread Sven Barth via fpc-pascal
Am Do., 31. Jan. 2019, 15:26 hat Bart geschrieben: > On Thu, Jan 31, 2019 at 7:35 AM Sven Barth via fpc-pascal > wrote: > > > > This is on an evil windows machine > > Windows is one of FPC's main targets, we can do without such > "expletives". > > M

Re: [fpc-pascal] h2pas fails on c++ header file

2019-01-31 Thread Sven Barth via fpc-pascal
Am Do., 31. Jan. 2019, 17:38 hat Giuliano Colla < giuliano.co...@fastwebnet.it> geschrieben: > Il 30/01/2019 13:17, Marco van de Voort ha scritto: > > > > > Op 1/30/2019 om 11:57 AM schreef Giuliano Colla: > >> > >> What I'm doing wrong? > >> > > Using a C header converter or a C++ header file.

Re: [fpc-pascal] Can FPC optimize: if (s[i]='a') or ...

2019-04-15 Thread Sven Barth via fpc-pascal
Am 15.04.2019 um 09:06 schrieb Bernd Oppolzer: Am 15.04.2019 um 08:29 schrieb Tomas Hajny: On Mon, April 15, 2019 07:52, Bernd Oppolzer wrote:   .   . On Samstag, 13. April 2019 22:30:55 CEST Alexey Tor. wrote:   .   . Can FPC optimize it so it only reads s[i] once (to register), not 3

Re: [fpc-pascal] Optional param modifier

2019-04-15 Thread Sven Barth via fpc-pascal
Am 15.04.2019 um 01:19 schrieb Ryan Joseph: On Apr 14, 2019, at 7:08 PM, Martin Frb wrote: Almost. assert takes the condition itself assert(condition_that_must_be_true, 'error message') so it would be assert(name<>'', 'requires "name <> " failed for CreateHero'); You can already

Re: [fpc-pascal] Optional param modifier

2019-04-15 Thread Sven Barth via fpc-pascal
Am 14.04.2019 um 23:48 schrieb Martin Frb: As for "documentation". I disagree with the way it is done in oxygen. But I am not sure I have any good alternative. For me a class contract (require/ensure) is part of the interface. So it would have to be like (and similar for plain procedures, no

Re: [fpc-pascal] strict private construct

2019-04-12 Thread Sven Barth via fpc-pascal
Graeme Geldenhuys schrieb am Fr., 12. Apr. 2019, 14:20: > On 12/04/2019 13:10, Graeme Geldenhuys wrote: > > On 12/04/2019 12:40, Mattias Gaertner via fpc-pascal wrote: > >> I get: > >> test1.pas(26,8) Error: identifier idents no member "FDropDown" > > > > It works in Delphi 10.2.3 > > > Ah wait,

Re: [fpc-pascal] Lazarus Release 2.0.2 - suggestions

2019-04-16 Thread Sven Barth via fpc-pascal
Rainer Stratmann schrieb am Di., 16. Apr. 2019, 13:47: > Are there plans to merge some windows? > > Like here (best solution): > https://cdn.portableapps.com/GeanyPortable.png > > Because I think it is no more up to date. > I don't know any other Software that uses so many windows across the

Re: [fpc-pascal] Really Strange Speed Problems - FPC & Neural Networks

2019-04-17 Thread Sven Barth via fpc-pascal
Am 17.04.2019 um 10:01 schrieb Joao Schuler: Hello, It's better not to reply to an existing mail with a completely new topic, cause now your mail is burrowed deep in the "Lazarus Release 2.0.2" thread. Better write directly to the list without replying. Regards, Sven

Re: [fpc-pascal] Optional param modifier

2019-04-13 Thread Sven Barth via fpc-pascal
On 4/13/19 11:39 PM, Martin Frb wrote: > On 13/04/2019 23:17, Ryan Joseph wrote: >> If there was any other way the compiler could make this contract more >> concrete and reliable then comments I’d be happy to hear it. > > I don't know what others think of it, but >

Re: [fpc-pascal] mode switch madness

2019-04-12 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Fr., 12. Apr. 2019, 16:37: > > > > On Apr 12, 2019, at 10:15 AM, Michael Van Canneyt < > mich...@freepascal.org> wrote: > > > > That would break with the rule that directives do not cross unit > boundaries. > > It has far-reaching consequences. > > > > Better introduce a

Re: [fpc-pascal] Optional param modifier

2019-04-14 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am So., 14. Apr. 2019, 00:17: > > > > On Apr 13, 2019, at 6:01 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > Well, there is Oxygene's concept of Class Contracts (see > > https://docs.elementscomp

Re: [fpc-pascal] Optional param modifier

2019-04-13 Thread Sven Barth via fpc-pascal
Marco van de Voort schrieb am Fr., 12. Apr. 2019, 20:56: > > Op 2019-04-12 om 17:23 schreef Ryan Joseph: > > > > What do you think of that? Sounds like an easy way to get some support > for nil pointers deref’s and provides self documenting code. > > I think the same as when I read the

Re: [fpc-pascal] unexpected termination with no errors

2019-05-15 Thread Sven Barth via fpc-pascal
Karoly Balogh (Charlie/SGR) schrieb am Mi., 15. Mai 2019, 15:25: > Hi, > > On Wed, 15 May 2019, James Richters wrote: > > > Has anyone encountered anything like this before or know how I can make > > sure I always get the maximum amount of debugging info when my program > > crashes? > > Is it a

Re: [fpc-pascal] unexpected termination with no errors

2019-05-15 Thread Sven Barth via fpc-pascal
Karoly Balogh (Charlie/SGR) schrieb am Mi., 15. Mai 2019, 18:40: > Hi, > > On Wed, 15 May 2019, Sven Barth via fpc-pascal wrote: > > >> (Sidenote: I've been pondering for a while if I should report this as a > >> bug. I think the RTL should put a tr

Re: [fpc-pascal] Convert codepages back to UTF8

2019-05-27 Thread Sven Barth via fpc-pascal
Alexey Tor. schrieb am Mo., 27. Mai 2019, 13:15: > LazUtils.LConvEncoding can convert utf8 to codepage (not many codepages) > and vice versa. > > FPC 3 can convert utf8 to codepage - via SetCodePage(s, codepage, true). > But how can FPC convert back - codepage to utf8? Does such way exist? >

Re: [fpc-pascal] Class field property access

2019-06-03 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Mo., 3. Juni 2019, 16:36: > I found a restriction in properties which is a little disappointing. I get > there’s probably some objective of safety but Pascal is a direct memory > access language so I don’t understand why properties have this unique > restriction when I

Re: [fpc-pascal] Convert codepages back to UTF8

2019-05-28 Thread Sven Barth via fpc-pascal
Alexey Tor. schrieb am Di., 28. Mai 2019, 14:44: > Ok, I got it. But I wonder: if my code changes codepage of a "string" to > e.g. 1250, will all Lazarus string functions work ok with such changed > string? For ex, will Pos('Петя', s) work? > Depends on what you do with the returned value.

Re: [fpc-pascal] Class field property access

2019-06-07 Thread Sven Barth via fpc-pascal
Michael Van Canneyt schrieb am Fr., 7. Juni 2019, 08:52: > > This appears to be a regression since 3.0.4 also. Did you specifically > > disable this in 3.3.1? Sorry I’m not understanding this one. > > If it was allowed in previous versions, this was by accident allowed during > parsing and

Re: [fpc-pascal] Class field property access

2019-06-07 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Fr., 7. Juni 2019, 14:00: > > > > On Jun 7, 2019, at 2:51 AM, Michael Van Canneyt > wrote: > > > > What kind of behaviour are you referring to. > > Something wrong with my mail server causing your server to block me (Jonas > said my server didn’t handle greylisting

Re: [fpc-pascal] Convert codepages back to UTF8

2019-05-28 Thread Sven Barth via fpc-pascal
Martok schrieb am Mo., 27. Mai 2019, 15:14: > Am 27.05.2019 um 14:30 schrieb Sven Barth via fpc-pascal: > > Alexey Tor. > <mailto:aaa5...@ya.ru>> schrieb am Mo., 27. Mai 2019, 13:15: > > > > LazUtils.LConvEncoding can convert utf8 to codepage (not many &g

Re: [fpc-pascal] Error? No range checks in mode delphi?

2019-06-04 Thread Sven Barth via fpc-pascal
Anthony Walter schrieb am Di., 4. Juni 2019, 03:27: > That fixes it, but then the question is why does {$mode delphi} differ > from {$mode objfpc}? > Mode ObjFPC is stricter in some cases. While mode Delphi cares for Delphi compatibility. Regards, Sven

Re: [fpc-pascal] Troubles with SQLDBRESTBridge

2019-06-22 Thread Sven Barth via fpc-pascal
Am 22.06.2019 um 10:30 schrieb Michael Van Canneyt: On Fri, 21 Jun 2019, Sven Barth via fpc-pascal wrote: Hello together! I've played around a bit with the SQLDBRESTBridge and encountered some troubles which I wanted to check up here on the list whether those are indeed bugs or not before

Re: [fpc-pascal] OpenBSD platform define

2019-06-21 Thread Sven Barth via fpc-pascal
Alexey Tor. schrieb am Fr., 21. Juni 2019, 13:10: > I cannot find such in the https://wiki.freepascal.org/Platform_defines - > its missed? > It's missing in the listing as is DragonFlyBSD and some others (e.g. the three supported Nintendo consoles). Regards, Sven >

[fpc-pascal] Troubles with SQLDBRESTBridge

2019-06-21 Thread Sven Barth via fpc-pascal
Hello together! I've played around a bit with the SQLDBRESTBridge and encountered some troubles which I wanted to check up here on the list whether those are indeed bugs or not before reporting them to Mantis. For the tests I've used FPC 3.0.4 and Lazarus 2.0 with the SQLDBRESTBridge and the

Re: [fpc-pascal] Troubles with SQLDBRESTBridge

2019-06-23 Thread Sven Barth via fpc-pascal
Am 23.06.2019 um 00:50 schrieb Michael Van Canneyt: On Sat, 22 Jun 2019, Sven Barth via fpc-pascal wrote: The REst Module has the additional disadvantage that you must have an initial /REST/ or whatever part in your URL. With the dispatcher on a datamodule, you can skip this if so desired

Re: [fpc-pascal] Troubles with SQLDBRESTBridge

2019-06-23 Thread Sven Barth via fpc-pascal
Am 23.06.2019 um 11:31 schrieb Michael Van Canneyt: On Sun, 23 Jun 2019, Sven Barth via fpc-pascal wrote: Okay, independently of whether the REST module is the optimal solution or not, it should work, right? (and shouldn't the Wiki entry then mention the advantages/disadvantages of the two

Re: [fpc-pascal] why isn't the 'exit' in the finally end clause executed?

2019-06-23 Thread Sven Barth via fpc-pascal
Am 23.06.2019 um 16:33 schrieb Jonas Maebe: On 23/06/2019 09:08, Dennis wrote: Using fpc 3.0.4, Lazarus 2.0, the following simple program program tryfinally; begin   try     Writeln('before finally');   finally Writeln('inside finally. Before Exit'); exit; //

Re: [fpc-pascal] Troubles with SQLDBRESTBridge

2019-06-24 Thread Sven Barth via fpc-pascal
Michael Van Canneyt schrieb am Mo., 24. Juni 2019, 09:30: > > > On Sun, 23 Jun 2019, Sven Barth via fpc-pascal wrote: > > >>>>> - localhost:8080/metadata works > >>>>> - localhost:8080/users returns "INVALID RESOURCE" > >>

Re: [fpc-pascal] Feature Announcement: Support for multiple active helpers per type

2019-05-10 Thread Sven Barth via fpc-pascal
Am 10.05.2019 um 22:21 schrieb Mattias Gaertner via fpc-pascal: On Fri, 10 May 2019 21:56:56 +0200 Sven Barth via fpc-pascal wrote: [...] We are pleased to announce that Free Pascal now supports the usage of multiple active helper types per extended type. This feature has been developed

[fpc-pascal] Feature Announcement: Support for multiple active helpers per type

2019-05-10 Thread Sven Barth via fpc-pascal
Hello together! We are pleased to announce that Free Pascal now supports the usage of multiple active helper types per extended type. This feature has been developed by Ryan Joseph, so thank you very much Ryan. To enable this feature you need to use the new modeswitch multihelpers. This

Re: [fpc-pascal] dot net dll in free pascal?

2019-05-13 Thread Sven Barth via fpc-pascal
Luca Olivetti schrieb am Mo., 13. Mai 2019, 23:14: > A sizeable part of my day job is to program PLCs in the worst software > environment ever (for the curious, simatic tia portal, actually I'm > mostly using the older, only marginally better, step 7, but the times > they are a-changin'). > Said

Re: [fpc-pascal] Checking if a TStringList already exists

2019-05-20 Thread Sven Barth via fpc-pascal
James Richters schrieb am Mo., 20. Mai 2019, 15:23: > Thank you very much for the explanation and examples of this! I am glad > you pointed out the FreeAndNill() function, I will defiantly be needing > that. > Though you need to keep in mind that only that single variable will be set to Nil.

Re: [fpc-pascal] Detecting console close with red X on windows

2019-05-19 Thread Sven Barth via fpc-pascal
James Richters schrieb am So., 19. Mai 2019, 19:10: > Thanks!That was quite helpful! I have a test program kind of > working. > > I notice I only get 5 seconds to do what I am going to before it closes, > and I also notice that my program can no longer respond to keystrokes after > I hit

Re: [fpc-pascal] Checking if a TStringList already exists

2019-05-21 Thread Sven Barth via fpc-pascal
James Richters schrieb am Di., 21. Mai 2019, 15:48: > I don’t seem to have FreeThenNil I’m using FPC 3.0.4RC1 I don’t use > Lazarus.. maybe it’s a Lazarus thing… or maybe it’s in a different unit > Correct, it's part of Lazarus. Regards, Sven > ___

Re: [fpc-pascal] dot net dll in free pascal?

2019-05-14 Thread Sven Barth via fpc-pascal
Luca Olivetti schrieb am Di., 14. Mai 2019, 09:13: > El 14/5/19 a les 0:15, Sven Barth via fpc-pascal ha escrit: > > > The file command under Linux says: > > Siemens.Engineering.dll: PE32 executable (DLL) (console) Intel 80386 > > Mono/.Net assembly, for MS

Re: [fpc-pascal] Problem linking external libs on Linux

2019-05-12 Thread Sven Barth via fpc-pascal
Anthony Walter schrieb am So., 12. Mai 2019, 20:42: > Okay, so I need to install the dev versions of any package I want to link > against. But when my program is distributed it will link at load time > correctly to the non dev versions. > It links against the version the development version

Re: [fpc-pascal] Problem linking external libs on Linux

2019-05-12 Thread Sven Barth via fpc-pascal
Anthony Walter schrieb am So., 12. Mai 2019, 18:41: > For example suppose I want to write some pascal code linking to an > external functions like so: > > const > libsdl2 = 'libSDL2-2.0.so.0'; > > function SDL_Init(flags: Uint32): LongInt; cdecl; external libsdl2; > procedure SDL_Quit; cdecl;

Re: [fpc-pascal] TThread.OnTerminate never called

2019-04-26 Thread Sven Barth via fpc-pascal
Dennis schrieb am Sa., 27. Apr. 2019, 05:22: > > > Sven Barth via fpc-pascal wrote: > > Am 21.04.2019 um 18:22 schrieb Dennis: > >> I am using FPC 3.0.4 Lazarus 2.00 on windows 64 > >> > >> I created a subclass of TThread and found out that the > >

Re: [fpc-pascal] Does FPC require glibc?

2019-05-06 Thread Sven Barth via fpc-pascal
Am 07.05.2019 um 00:16 schrieb Nozz via fpc-pascal: On Monday, May 6, 2019 10:48 PM, Sven Barth wrote: Nozz via fpc-pascal > schrieb am Mo., 6. Mai 2019, 22:18: Empty Message Depends on what you're using (and the platform). E.g. the compiler

Re: [fpc-pascal] Does FPC require glibc?

2019-05-06 Thread Sven Barth via fpc-pascal
Nozz via fpc-pascal schrieb am Mo., 6. Mai 2019, 22:18: > Empty Message > Depends on what you're using (and the platform). E.g. the compiler itself runs without glibc on Linux, but if you need to use threads for example that changes. Also if you link against libraries like GTK or Qt you also

Re: [fpc-pascal] Does FPC require glibc?

2019-05-07 Thread Sven Barth via fpc-pascal
Michael Van Canneyt schrieb am Di., 7. Mai 2019, 08:32: > > > On Mon, 6 May 2019, Nozz via fpc-pascal wrote: > > > On Monday, May 6, 2019 10:48 PM, Sven Barth > wrote: > > > >> Nozz via fpc-pascal schrieb am Mo., > 6. Mai 2019, 22:18: > >> > >>> Empty Message > >> > >> Depends on what you're

Re: [fpc-pascal] Turbo Pascal 3 graphics

2019-05-08 Thread Sven Barth via fpc-pascal
Kevin Lyda schrieb am Mi., 8. Mai 2019, 10:58: > Amazingly I still have a number of my high school computer science > projects which were written in Turbo Pascal 3. And a few are almost > not horribly embarrassing. > > I'd like to port them to fpc and write up the experience but I know > what

Re: [fpc-pascal] how to customize so Pandroid would be usable from Lazarus for windows

2019-04-18 Thread Sven Barth via fpc-pascal
Am 18.04.2019 um 12:46 schrieb Tomas Hajny: On Thu, April 18, 2019 12:32, Mgr. Janusz Chmiel wrote: . . I have also started to transform build.sh to Windows batch file. Which issues AM I facingnow? . . echo ppcjvm -

Re: [fpc-pascal] Improve message "Wrong ppu found"

2019-04-27 Thread Sven Barth via fpc-pascal
leledumbo via fpc-pascal schrieb am Sa., 27. Apr. 2019, 15:14: > > Please provide a real example of a compiler output, cause I can't find > "Wrong ppu found" in the sources. > > I think what he meant is: > > $ grep -i 'wrong ppu version' -r * > pkgutil.pas: Comment(V_Error,'Wrong PPU

Re: [fpc-pascal] Virtual object methods

2019-07-02 Thread Sven Barth via fpc-pascal
Am 02.07.2019 um 19:43 schrieb Michael Van Canneyt: On Tue, 2 Jul 2019, Ryan Joseph wrote: On Jul 2, 2019, at 10:32 AM, Michael Van Canneyt wrote: It overwrites the first. There is no such thing as '2 VMT tables'. That’s what I thought. How costly is this? Not sure what it’s doing

Re: [fpc-pascal] Wiki: platform defines

2019-06-28 Thread Sven Barth via fpc-pascal
Alexey Tor. schrieb am Fr., 28. Juni 2019, 12:16: > https://wiki.freepascal.org/Platform_defines#Operating_system_defines > > I 've added all defines of OS. You can tell me if it's not ok. Missed > one item: 'nativent' target. Seems some Win32 target? why new? Why it > don't have extradefines

Re: [fpc-pascal] Compile fpc twice or only once during install?

2019-07-12 Thread Sven Barth via fpc-pascal
Christo Crause schrieb am Fr., 12. Juli 2019, 15:30: > > On Fri, 12 Jul 2019, 14:19 Bo Berglund, wrote: > >> When I install FPC/Lazarus on new Linux systems I use a script I wrote >> several years ago. It is cofigured for the actual versions to install >> but otherwise it is self-contained. >>

[fpc-pascal] Initial support for Custom Attributes

2019-07-12 Thread Sven Barth via fpc-pascal
Hello together! Today FPC has finally gained initial support for Custom Attributes. The work had initially been done by Joost van der Sluis almost 6 years ago and Svetozar Belic had adjusted the code for trunk. So thank you both for that work even if it took quite some time until it was

Re: [fpc-pascal] Implementation of variant records

2019-07-07 Thread Sven Barth via fpc-pascal
Am 07.07.2019 um 02:55 schrieb Ralf Quint: On 7/6/2019 12:21 PM, Florian Klaempfl wrote: Am 05.07.2019 um 13:53 schrieb Ralf Quint: Shouldn't a PACKED Record guarantee that values are aligned at the byte level? It does in TP, but the ISO says only that it shall be economised. Well, the ISO

Re: [fpc-pascal] Developing a mini ERP / web based development

2019-07-07 Thread Sven Barth via fpc-pascal
Graeme Geldenhuys schrieb am So., 7. Juli 2019, 11:45: > Does FPC support annotations yet? > In the Object Pascal world they are called custom attributes, are accessible through the RTTI and their syntax is [AttributeName(Arguments)]. There exists a branch with them and it's "just" a matter of

Re: [fpc-pascal] Implementation of variant records

2019-07-07 Thread Sven Barth via fpc-pascal
Am 07.07.2019 um 12:54 schrieb Sven Barth: Am 07.07.2019 um 02:55 schrieb Ralf Quint: On 7/6/2019 12:21 PM, Florian Klaempfl wrote: Am 05.07.2019 um 13:53 schrieb Ralf Quint: Shouldn't a PACKED Record guarantee that values are aligned at the byte level? It does in TP, but the ISO says only

Re: [fpc-pascal] String conversions

2019-06-26 Thread Sven Barth via fpc-pascal
Am 26.06.2019 um 23:36 schrieb Ryan Joseph: On Jun 26, 2019, at 3:28 PM, Ben Grasset wrote: I think Ryan probably meant his own custom types. And certainly, you can do some interesting stuff with operator overloading that mostly avoids the normal AnsiString overhead. Here's an example.

Re: [fpc-pascal] String conversions

2019-06-26 Thread Sven Barth via fpc-pascal
Am 27.06.2019 um 07:10 schrieb Sven Barth: Am 26.06.2019 um 23:36 schrieb Ryan Joseph: On Jun 26, 2019, at 3:28 PM, Ben Grasset wrote: I think Ryan probably meant his own custom types. And certainly, you can do some interesting stuff with operator overloading that mostly avoids the normal

Re: [fpc-pascal] specify variable name with string variable

2019-07-08 Thread Sven Barth via fpc-pascal
James Richters schrieb am Mo., 8. Juli 2019, 22:44: > SetStoragePinByName('Ini_Opto_Enable_Positive_Pin', True) ; > > And it would somehow get the value of 'Ini_Opto_Enable_Positive_Pin > That indeed sounds like something where you could use classes together with published properties. At least

Re: [fpc-pascal] Resolving math expression as input from user

2019-04-23 Thread Sven Barth via fpc-pascal
Am 23.04.2019 um 12:04 schrieb James Richters: I'm trying to figure out if there is some function available that would take a string as input and return a double value that is the complete evaluation of the string? So when asked for a numeric input, the user could just put in a number like

Re: [fpc-pascal] Record helper properties

2019-04-24 Thread Sven Barth via fpc-pascal
Am 24.04.2019 um 15:28 schrieb Ryan Joseph: On Apr 24, 2019, at 2:27 AM, Michael Van Canneyt wrote: I would think this should be allowed, yes. I see no reason to disallow it. Agreed but Sven says something about published fields though. The property just acts as simple alias so I don’t

Re: [fpc-pascal] class operator enumerator

2019-04-24 Thread Sven Barth via fpc-pascal
Am 24.04.2019 um 15:31 schrieb Ryan Joseph: On Apr 24, 2019, at 12:30 AM, Ben Grasset wrote: Seems like it's mixed up in some way with the FPC-style enumerator operator, so the "class" version is recognized but not actually implemented currently or something. The normal way for

Re: [fpc-pascal] mode switch madness

2019-04-14 Thread Sven Barth via fpc-pascal
Am 14.04.2019 um 17:03 schrieb Ryan Joseph: On Apr 13, 2019, at 10:07 PM, Ben Grasset wrote: E.G, I sincerely doubt that anybody has *ever* thought, "man, I sure am glad that {$mode ObjFPC} does not allowed advanced records. It would be specifically bad if it did!" because it just doesn't

Re: [fpc-pascal] mode switch madness

2019-04-14 Thread Sven Barth via fpc-pascal
Am 14.04.2019 um 04:07 schrieb Ben Grasset: I dunno about setting them globally, but generally I do find modeswitches rather annoying, as the combination of features is pretty arbitrary, and they mostly just *disallow* things that couldn't break the code of people who weren't using those

Re: [fpc-pascal] Optional param modifier

2019-04-14 Thread Sven Barth via fpc-pascal
Am 14.04.2019 um 16:05 schrieb Ryan Joseph: On Apr 14, 2019, at 3:15 AM, Sven Barth via fpc-pascal wrote: Your idea requires exceptions as well. The compiler is not capable checking whether valid entries are passed in at compile time except for simple, constant cases, so runtime checks

Re: [fpc-pascal] Record helper properties

2019-04-23 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Di., 23. Apr. 2019, 21:54: > So I remember now that any fields are not allowed in helpers. Can anyone > explain why this must be the case or if it could be fixed? > A helper can not access its extended type in its interface, only in its implementation (and yes, this gets

Re: [fpc-pascal] Improve message "Wrong ppu found"

2019-04-26 Thread Sven Barth via fpc-pascal
Am 24.04.2019 um 10:14 schrieb Alexey Tor.: Suggestion: in the message $subj, can you add FPC version of that PPU? so it will be "Wrong PPU found [FPC 2.7.8]" when FPC needs PPU for 3.2.0. Please provide a real example of a compiler output, cause I can't find "Wrong ppu found" in the sources.

Re: [fpc-pascal] fpc 3.2: "Declaration of type TTypeList changed"

2019-04-26 Thread Sven Barth via fpc-pascal
Am 25.04.2019 um 22:23 schrieb Luca Olivetti: Hello, as per the subject, I've been bitten by this change: http://wiki.freepascal.org/User_Changes_Trunk#Declaration_of_type_TTypeList_changed This code (FTasks is a specialization of TFPGList)   for i:=0 to FTasks.Count-1 do   begin    

Re: [fpc-pascal] TThread.OnTerminate never called

2019-04-26 Thread Sven Barth via fpc-pascal
Am 21.04.2019 um 18:22 schrieb Dennis: I am using FPC 3.0.4 Lazarus 2.00 on windows 64 I created a subclass of TThread and found out that the TThread.OnTerminate event was never called (I already assigned it). Also, I search the source code of TThread in classeh.inc and found that there was

Re: [fpc-pascal] Troubles with SQLDBRESTBridge

2019-07-01 Thread Sven Barth via fpc-pascal
Am 24.06.2019 um 09:30 schrieb Michael Van Canneyt: With the sample module, I tested all possible cases: I updated both FPC and Lazarus and also tested the sample module. However those variants BasePath empty don't work. I get an exception at line 2053 of sqldbrestbridge.pp. It seems that

Re: [fpc-pascal] Troubles with SQLDBRESTBridge

2019-07-01 Thread Sven Barth via fpc-pascal
Am 01.07.2019 um 23:18 schrieb Michael Van Canneyt: By the way: is it correct that the sqldbrestdataset currently does not support editing/inserting/deleting entries? Do you plan to change this? Ehm, no, of course it is supposed to support that. It would not be much good if it didn't :-)

<    1   2   3   4   5   6   7   8   9   10   >