Re: [fpc-pascal] download mirror is missing

2017-05-25 Thread Sven Barth via fpc-pascal
; > But I'll simply revert it back to what it was before all the tcl. > A simple pascal program that uses a template to create the menu structure > and generate the download pages from the mirror list... I think "simple pascal program" definitely sounds like a general skill anyone on Core has :P Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] download mirror is missing

2017-05-26 Thread Sven Barth via fpc-pascal
2017-05-25 17:22 GMT+02:00 Marco van de Voort : > In our previous episode, Sven Barth via fpc-pascal said: >> > >> > In particular, avoid these languages: >> > https://www.destroyallsoftware.com/talks/wat >> >> I'd say if he decides to use JS he&#x

Re: [fpc-pascal] Why casting interface as Tobject will result in a different reference?

2017-05-26 Thread Sven Barth via fpc-pascal
on't provide QueryInterface() which is needed for this). At least for me the compiler *did* complain (both 3.0.2 and 3.1.1) when I tested this. So the question is: is IMyInterface indeed a CORBA interface? If so then why does the compiler not complain? If not then why doesn't it work? F

[fpc-pascal] named parameter

2017-05-26 Thread Mr Bee via fpc-pascal
think? :) -- Regards, –Mr Bee _______________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] named parameter

2017-05-27 Thread Sven Barth via fpc-pascal
2017-05-27 9:54 GMT+02:00 Michael Van Canneyt : > > > On Sat, 27 May 2017, Mr Bee via fpc-pascal wrote: > >> Hi, >> >> As Pascal mostly well known as a safe, easy to read, and elegant language, >> don't you think Pascal needs named parameter? I mean fo

Re: [fpc-pascal] named parameter

2017-05-27 Thread Sven Barth via fpc-pascal
2017-05-27 16:12 GMT+02:00 Michael Van Canneyt : > > > On Sat, 27 May 2017, Sven Barth via fpc-pascal wrote: > >> 2017-05-27 9:54 GMT+02:00 Michael Van Canneyt : >>> >>> >>> >>> On Sat, 27 May 2017, Mr Bee via fpc-pascal wrote: >>> &g

Re: [fpc-pascal] Why casting interface as Tobject will result in a different reference?

2017-05-27 Thread Sven Barth via fpc-pascal
2017-05-27 18:10 GMT+02:00 Dennis Poon : > > > Sven Barth via fpc-pascal wrote: >> >> The idea itself is valid, cause "(IMyInterfaceVar as TObject) as >> IMyInterface = IMyInterfaceVar" is true if and only if IMyInterface is >> a COM interface. If IMyInte

Re: [fpc-pascal] named parameter

2017-05-28 Thread Sven Barth via fpc-pascal
If anything like this would be implemented, then the already existing syntax (for variant dispatch calls) would be used which uses ":=". Regards, Sven ___________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] named parameter

2017-05-29 Thread Sven Barth via fpc-pascal
Am 29.05.2017 10:26 schrieb "Ryan Joseph" : > > > > On May 29, 2017, at 1:01 PM, Sven Barth via fpc-pascal < fpc-pascal@lists.freepascal.org> wrote: > > > > If anything like this would be implemented, then the already existing syntax (for variant

[fpc-pascal] Bls: named parameter

2017-05-30 Thread Mr Bee via fpc-pascal
r something, so it doesn't bother anyone who don't want this feature. Thank you. Regards, –Mr Bee Pada Sabtu, 27 Mei 2017 21:18, Sven Barth via fpc-pascal menulis: 2017-05-27 16:12 GMT+02:00 Michael Van Canneyt : > > > On Sat, 27 May 2017, Sven Barth via

Re: [fpc-pascal] GDBServer

2017-06-01 Thread Sven Barth via fpc-pascal
Am 01.06.2017 16:49 schrieb "Dimitrios Chr. Ioannidis via fpc-pascal" < fpc-pascal@lists.freepascal.org>: > > Hi, > > I'm trying to "convince" gdbserver ( not gdb ) to attach to a windows service, but I'm always get the "Attach to process fai

Re: [fpc-pascal] SIGSEGV in fpc_check_object

2017-06-14 Thread Sven Barth via fpc-pascal
e. The value of it is simply what is currently on the stack which *can* be Nil. Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Running Freepascal programs on other computers

2017-06-29 Thread Sven Barth via fpc-pascal
l dialogs The dialog that occurs when you download a program is also controlled somewhere, but it's cause is an alternate datastream that gets attached to the downloaded file. I don't know right now whether signing the execuable makes a difference here aside from the dialog looking less

Re: [fpc-pascal] Running Freepascal programs on other computers

2017-06-29 Thread Sven Barth via fpc-pascal
Am 29.06.2017 23:27 schrieb "Bo Berglund" : > > On Thu, 29 Jun 2017 11:08:40 +0200, Sven Barth via fpc-pascal > wrote: > > >- open "Internet Options" > > The wording on these option pages seem to indicate that they are for > websites. That is all the

Re: [fpc-pascal] Food for thought - language string improvement

2017-07-06 Thread Sven Barth via fpc-pascal
dvantage that one can't easily add variables, but for things like this one can always pass the included string to Format() and friends which in my opinion would be more cleaned up anyway. Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] If vs case or something else?

2017-07-06 Thread Sven Barth via fpc-pascal
d. === code end === The variant with the enum has the advantage that the compiler will complain about missing elements if you add one to the enum type. Though in both cases you should ensure that your index is in range. In case of many branches the variant with the array (any of the two v

Re: [fpc-pascal] Food for thought - language string improvement

2017-07-06 Thread Sven Barth via fpc-pascal
> > Thanks for the link. Seems this topic has already been discussed a year and a bit ago. > > Anybody know if there was any movement on the $IncludeString idea? See my message from yesterday night. :) Regards, Sven ___________ fpc-pascal maillist - f

Re: [fpc-pascal] Food for thought - language string improvement

2017-07-10 Thread Sven Barth via fpc-pascal
etween the specialized parameters that's inherited from the non-generic parent list type. You might want to test with the list provided by the rtl-generics package. Regards, Sven _______ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Food for thought - language string improvement

2017-07-10 Thread Sven Barth via fpc-pascal
cal as well: === code begin === try expect on e: EWhatever do ...; on e: EFoobar do ...; else ... end; === code end === Though you can't use the same code block for multiple types. Regards, Sven ___________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Delete and Add for TBytes?

2017-07-12 Thread Sven Barth via fpc-pascal
= Buffer + c; The + operator is not yet implemented by default on FPC (neither is Concat()), but you can easily declare that yourself. Regards, Sven _______________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Subclassing generic records?

2017-07-17 Thread Sven Barth via fpc-pascal
her the extended type is a specialization or not). Regards, Sven ___________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Semaphores removed from the rtl?

2017-07-19 Thread Sven Barth via fpc-pascal
ver intended for public use and only available for a specific use case. For cross platform use the Delphi compatible TSemaphore in the SyncObjs unit should be implemented... Regards, Sven _______ fpc-pascal maillist - fpc-pascal@lists.fre

Re: [fpc-pascal] Static local variables available?

2017-07-20 Thread Sven Barth via fpc-pascal
end; > > begin > foo; // will print empty line > foo; // will print 'hello from static local variable' > foo; // will print 'hello from static local variable' > end. For completeness sake: https://www.freepascal.org/docs-html/current/ref/refse10.html#x22-

Re: [fpc-pascal] Subclassing generic records?

2017-07-20 Thread Sven Barth via fpc-pascal
On 17.07.2017 19:20, Ryan Joseph wrote: > >> On Jul 17, 2017, at 10:58 AM, Sven Barth via fpc-pascal >> wrote: >> >> I'll need to check whether Delphi allows that for helpers (doesn't matter >> whether the extended type is a specialization or no

Re: [fpc-pascal] Static local variables available?

2017-07-20 Thread Sven Barth via fpc-pascal
> but it looks a bit involved, probably better to use an object field > variable instead only accessible from the internal methods. If you don't want to use $push/$pop then you can also simply enable $J+ for the whole unit. But this will also mean that global constants are writable. Re

Re: [fpc-pascal] Static local variables available?

2017-07-21 Thread Sven Barth via fpc-pascal
Am 21.07.2017 10:44 schrieb "Santiago A." : > > El 20/07/2017 a las 15:50, Sven Barth via fpc-pascal escribió: >> >> Am 20.07.2017 13:01 schrieb "Bo Berglund" : >> > >> > On Thu, 20 Jul 2017 11:11:50 +0200, Maciej Izak >&g

Re: [fpc-pascal] Sistema grande em CGI

2017-07-21 Thread Sven Barth via fpc-pascal
Obrigado This is an English list, so please write in English. Regards, Sven ___________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Subclassing generic records?

2017-07-21 Thread Sven Barth via fpc-pascal
with operators that are part of the class that would be much more inviting. Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] SVN RSS

2017-07-25 Thread Andrew Haines via fpc-pascal
aines _______ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Best way to insert bytes into a TBytes variable?

2017-07-26 Thread Sven Barth via fpc-pascal
TBytes; > begin > b:= TBytes.Create(1,2,3); > c:= TBytes.Create(10,11); > Insert(c,b,2); > > -> b is now [1,2,10,11,3] But only in trunk. And Delphi XE8 and newer also support them. Regards, Sven ___________ fpc-pascal maillist - fp

Re: [fpc-pascal] Best way to insert bytes into a TBytes variable?

2017-07-27 Thread Sven Barth via fpc-pascal
ly trunk supports this as well as Delete() (Concat() is not yet implemented however). Regards, Sven _______ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] XML: Differences between Delphi and FPC

2017-07-30 Thread Sven Barth via fpc-pascal
.. Regards, Sven ___________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] XML: Differences between Delphi and FPC

2017-07-30 Thread Sven Barth via fpc-pascal
lphi classes? Addendum: FPC's XML library probably also comes from a time when Delphi didn't have a standard library to deal with XML. Regards, Sven ___________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Best way to insert bytes into a TBytes variable?

2017-07-30 Thread Sven Barth via fpc-pascal
ally meant AnsiString and was a 1-byte per element container. You could always use RawByteString or a string with a fixed codepage instead if plain AnsiString. Just declare a type alias so that you can keep it compatible with older Delphi versions as well. Regards, Sven _

Re: [fpc-pascal] BlockWrite of dynamic arrays

2017-07-30 Thread Sven Barth via fpc-pascal
he index which *should* work with strings as well, though I don't know whether it always did... If that doesn't work simply write two overloaded inline functions that return the index of the first element depending on whether it's String or TBytes. Regards, Sven ___

Re: [fpc-pascal] Best way to insert bytes into a TBytes variable?

2017-07-30 Thread Sven Barth via fpc-pascal
Am 30.07.2017 12:37 schrieb "Bo Berglund" : > > On Sun, 30 Jul 2017 09:33:59 +0200, Sven Barth via fpc-pascal > wrote: > > >> The application was started back in Delphi7 times when "string" > >> actually meant AnsiString and was a 1-byte

Re: [fpc-pascal] Const attributes

2017-07-30 Thread Sven Barth via fpc-pascal
target) as the DFA can't handle that correctly currently. (though if one would restrict the assignments to the constructors itself without any methods called by the constructor then we might be able to implement that nevertheless, don't know what Java or other languages w

Re: [fpc-pascal] inline callback functions?

2017-08-08 Thread Sven Barth via fpc-pascal
ipermail/fpc-devel/2016-August/037328.html > > Yes, closures. Seems like development may be abandoned but it’s a good idea none the less. The development is still in progress, albeit slowly. Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Defining sonames?

2017-08-13 Thread Sven Barth via fpc-pascal
he names of the library will change with every version. Regards, Sven _______ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] TInifile does not handle " " (space) as a value.

2017-08-15 Thread Sven Barth via fpc-pascal
a descendent of TCustomIniFile. > > Class method TJSONIniFile.ConvertIni will convert an .ini file to a .json file. > It attempts to use native types when possible. > > ini2json example program included. > > One item scratched off my long TODO list ;) Not entirely: "mak

Re: [fpc-pascal] TInifile does not handle " " (space) as a value.

2017-08-15 Thread Sven Barth via fpc-pascal
Am 15.08.2017 11:57 schrieb "Michael Van Canneyt" : > > > > On Tue, 15 Aug 2017, Sven Barth via fpc-pascal wrote: > >> Am 15.08.2017 11:17 schrieb "Michael Van Canneyt" : >>> >>> >>> >>> >>> On Mon, 14 Aug

Re: [fpc-pascal] Defining sonames?

2017-08-16 Thread Sven Barth via fpc-pascal
ly exists for Kylix compatibility 2. the LIBC_SO constant is used nowhere (the library constant is "clib" and has the value 'c') The only other use of "libc.so.6" is in iconvenc_dyn.pas, but that is because it is loading the library dynamically and there the rea

Re: [fpc-pascal] Defining sonames?

2017-08-17 Thread Sven Barth via fpc-pascal
Am 17.08.2017 15:49 schrieb "Graeme Geldenhuys" < mailingli...@geldenhuys.co.uk>: > > On 2017-08-16 18:14, Sven Barth via fpc-pascal wrote: >> >> As you can see the program will work correctly as long as the >> libX11.so.6 file exists (even though that is

Re: [fpc-pascal] Defining sonames?

2017-08-17 Thread Sven Barth via fpc-pascal
t currently as it still has its shortcomings. But even then it would follow the conventions of the target OS. Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Defining sonames?

2017-08-17 Thread Sven Barth via fpc-pascal
orks (on Linux at least). I used that when I tested dynamic packages and wanted the linker to use "librtl.ppl" instead of "librtl.so" ;) Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] TStringHelper missing

2017-08-21 Thread Sven Barth via fpc-pascal
bugreport about it. > Sven Barth can confirm/deny this. I thought that was fixed? Except of course if $H- is used (which is the default in all modes except the Delphi ones) cause then String = AnsiString. Regards, Sven _______ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] TStringHelper missing

2017-08-21 Thread Sven Barth via fpc-pascal
; > > or > > Str : WideString; > > > > I believe the compiler has some trouble finding the helper if you use the > > 'string' alias. I think there is even a bugreport about it. > > Sven Barth can confirm/deny this. > > I thought that was fixed? Ex

Re: [fpc-pascal] Freepascal Floating Point Issue

2017-08-21 Thread Sven Barth via fpc-pascal
7;T* compare floating point numbers like that. Instead use SameValue() from the Math unit which has an additional epsilon value (with a default value) that defines a lower and upper bound from your desired value to compare to. Regards, Sven _______________

Re: [fpc-pascal] Freepascal Floating Point Issue

2017-08-22 Thread Sven Barth via fpc-pascal
#x27;t be exact. Additionally Extended is not cross platform. Regards, Sven _______________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Check In Interface Type Helpers

2017-08-22 Thread Sven Barth via fpc-pascal
e already :) Regards, Sven ___________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Check In Interface Type Helpers

2017-08-23 Thread Sven Barth via fpc-pascal
would have been a global function, now I can also do a helper with a method. Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Check In Interface Type Helpers

2017-08-23 Thread Sven Barth via fpc-pascal
Is this compatible with Delphi? Interface helpers are only supported by FPC. But the other helpers (class, record, primitive types) are Delphi compatible. Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Check In Interface Type Helpers

2017-08-23 Thread Sven Barth via fpc-pascal
> > > > TDayHelper = record helper for TDay > > function AsByte: Byte; > > function ToString: string; > > end; > > I didn't know that helpers could be used in enums too. Great. Helpers for primitive types are supported since 3.0.0. Regards,

Re: [fpc-pascal] Check In Interface Type Helpers

2017-08-23 Thread Sven Barth via fpc-pascal
ones are in scope. Also one can cheat a bit by having one's own helper inherit from another helper of the same type ;) Though I should mention that it's on my list to implement support for multiple helpers. I just need to be sure about the resolution rules :) Regards, Sven ___

Re: [fpc-pascal] Check In Interface Type Helpers

2017-08-23 Thread Sven Barth via fpc-pascal
per". > It's like default methods in Java(?) that we have code inside an interface... I don't know about Java, but the C# equivalent would be extension methods. And yes, that's the point: the implementation is not part of the interface implementer, but the user of the interfac

Re: [fpc-pascal] Check In Interface Type Helpers

2017-08-23 Thread Sven Barth via fpc-pascal
, but FPC supports it also for record and type helpers. Regards, Sven ___________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Check In Interface Type Helpers

2017-08-23 Thread Sven Barth via fpc-pascal
rsistsFile; > P.Save(Link, True); > end; > end; > And I just noticed: it's "type helper" if you want to extend an interface, not "record helper" ;) Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Check In Interface Type Helpers

2017-08-23 Thread Sven Barth via fpc-pascal
On 23.08.2017 19:57, Marcos Douglas B. Santos wrote: > On Wed, Aug 23, 2017 at 2:45 PM, Sven Barth via fpc-pascal > wrote: >> Am 23.08.2017 19:39 schrieb "Marcos Douglas B. Santos" : >>> >>> Wait a minute. Now I realize that procedure IShellLinkHelper.Sa

Re: [fpc-pascal] Check In Interface Type Helpers

2017-08-23 Thread Sven Barth via fpc-pascal
On 23.08.2017 20:38, Marcos Douglas B. Santos wrote: > On Wed, Aug 23, 2017 at 3:25 PM, Sven Barth via fpc-pascal > wrote: >> On 23.08.2017 19:57, Marcos Douglas B. Santos wrote: >>> Would we have any problem of memory leaks using Interface helper with >>> COM int

Re: [fpc-pascal] Inline ASM code

2017-08-24 Thread Sven Barth via fpc-pascal
ght want to check which register you can use for that Note 3: I hope you keep the global and the assembler function in the same unit, because inter-unit access to globals changes when dynamic packages are enabled for a target Regards, Sven ___ fpc-pascal maill

Re: [fpc-pascal] Freepascal Floating Point Issue

2017-08-24 Thread Sven Barth via fpc-pascal
Am 23.08.2017 02:16 schrieb "Paul Nance" : > > Turbo Pascal also had a BCD unit. Free Pascal also has a BCD unit: FmtBCD. It provides a BCD type and operators as well operator overloads. Regards, Sven _______ fpc-pascal maillis

Re: [fpc-pascal] Freepascal Floating Point Issue

2017-08-24 Thread Sven Barth via fpc-pascal
;) Note: FPC (and Delphi) has a single fixed point type which is Currency. AFAIK it uses four digits after the comma and 28 in front of it. Regards, Sven _______ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/m

Re: [fpc-pascal] Freepascal Floating Point Issue

2017-08-24 Thread Sven Barth via fpc-pascal
problems (in fact even 64-bit software can, but since Microsoft declared it as deprecated for the 64-bit mode it might happen in the future that it is no longer supported). Regards, Sven ___________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lis

Re: [fpc-pascal] Freepascal Floating Point Issue

2017-08-24 Thread Sven Barth via fpc-pascal
Plase note that all non-Windows 64-bit systems have no problems with enabling the FPU and even Windows needs to handle it due to 32-bit software requiring it. The only x86_64 OS we support that doesn't have Extended enabled (by default) *is* Win64. Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Freepascal Floating Point Issue

2017-08-25 Thread Sven Barth via fpc-pascal
Am 24.08.2017 23:26 schrieb "Tomas Hajny" : > > On Thu, August 24, 2017 22:25, Ralf Quint wrote: > > On 8/24/2017 2:18 AM, Sven Barth via fpc-pascal wrote: > >> > >> Am 23.08.2017 02:16 schrieb "Paul Nance" >> <mailto:pwna...@

Re: [fpc-pascal] H2pas tool vs others, C header translation

2017-08-26 Thread Sven Barth via fpc-pascal
but has a different size. Regards, Sven ___________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] H2pas tool vs others, C header translation

2017-08-26 Thread Sven Barth via fpc-pascal
Am 26.08.2017 09:50 schrieb "Michael Van Canneyt" : > > > > On Sat, 26 Aug 2017, Sven Barth via fpc-pascal wrote: > >> Am 26.08.2017 07:25 schrieb : >>> >>> >>> What about the BOOL issue.. >>> >>> We know that Boolean

Re: [fpc-pascal] H2pas tool vs others, C header translation

2017-08-26 Thread Sven Barth via fpc-pascal
r "INT_FALSE", because that would show that FPC is not up to the job to correctly handle this. Please also note that I'm only talking about cases where there is indeed a definition of a boolean type on the C side of things (e.g. the Windows API with its BOOL as well as TRUE and FALSE definitions and GTK for which the Boolean16, -32 and -64 types were introduced). Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] H2pas tool vs others, C header translation

2017-08-26 Thread Sven Barth via fpc-pascal
On 26.08.2017 13:43, Michael Van Canneyt wrote: > > > On Sat, 26 Aug 2017, Sven Barth via fpc-pascal wrote: > >>> >>> I did read it. >>> >>> I think the programmer *must* worry about the details and must >>> definitely >>&

Re: [fpc-pascal] H2pas tool vs others, C header translation

2017-08-27 Thread Sven Barth via fpc-pascal
. But there is also a Boolean64 and QWordBool ;) Regards, Sven ___________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] H2pas tool vs others, C header translation

2017-08-27 Thread Sven Barth via fpc-pascal
On 27.08.2017 19:27, Marco van de Voort wrote: > In our previous episode, Sven Barth via fpc-pascal said: >> Am 27.08.2017 00:10 schrieb "Marco van de Voort" : >>> The GTK headers also use a 0/1 boolean, and for that the boolean8/16/32 >>> types were create

Re: [fpc-pascal] Freepascal Floating Point Issue

2017-08-27 Thread Sven Barth via fpc-pascal
crosoft ever bring out a 64-bit only OS they can simply disable the FPU handling in their kernel (e.g. saving the FPU state during a context switch) and then you are doomed and they did even warn you about this, cause they declared the x87 as deprecated from the beginning on Win64. Regards, Sven ___

Re: [fpc-pascal] Freepascal Floating Point Issue

2017-08-29 Thread Sven Barth via fpc-pascal
Am 29.08.2017 08:35 schrieb "Michael Schnell" : > > On 28.08.2017 08:04, Sven Barth via fpc-pascal wrote:I don't understand why we will have no more the right to use it under x64 OS... >> >> >> Because Microsoft declared it as deprecated. That means that s

Re: [fpc-pascal] TP compatibility: procedural type

2017-08-29 Thread Sven Barth via fpc-pascal
vant on i8086. All the other targets don't have the distinction in "near" and "far", so it's not necessary to artificially restrict everything. Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] TP compatibility: procedural type

2017-08-29 Thread Sven Barth via fpc-pascal
ey guarranty > only forward-compatibility? The modes are for the case have code written for other compilers (TP, MacPas, Delhi, ISO) work in FPC (as good as reasonably possible). We do however *not* guarantee that code written in one of these modes with FPC compiles or runs with the corresponding compiler. Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] TP compatibility: procedural type

2017-08-29 Thread Sven Barth via fpc-pascal
modes, but you need to do that explicitly, as there might be code breakages due to this. Regards, Sven ___________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] implements

2017-09-02 Thread Sven Barth via fpc-pascal
ss; > > base := TBaseClass.Create; > > base.DoIt; // CANT DO THIS > base.hook.DoIt; // MUST DO THIS Because you must use the interface and not the class instance: === code begin === var base: TBaseClass; hook: IHook; begin base := TBaseClass.Create; hook := base; hook.DoIt

Re: [fpc-pascal] implements

2017-09-02 Thread Sven Barth via fpc-pascal
with the IHook interface. And this is what the implements feature is for. Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] implements

2017-09-06 Thread Sven Barth via fpc-pascal
ust an advanced variant of that in that it allows you to use a complete class (though you're still able to implement selected methods of the interface in the base class which aren't delegated then). Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Where and Why is there a memory leak?

2017-09-06 Thread Sven Barth via fpc-pascal
: http://docwiki.embarcadero.com/RADStudio/Tokyo/en/Implementing_Interfaces Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Where and Why is there a memory leak?

2017-09-06 Thread Sven Barth via fpc-pascal
But TInterfacedObject is a class isn’t it? Then you call FHook := THook.Create; so a I’d expect a Free(). What am I missing? > > type > THook = class(TInterfacedObject, IHook) > private >procedure DoIt; > end; You're missing that FHook was declared as IHook, not THook.

Re: [fpc-pascal] Where and Why is there a memory leak?

2017-09-06 Thread Sven Barth via fpc-pascal
Am 07.09.2017 03:48 schrieb "Ryan Joseph" : > > > > On Sep 6, 2017, at 10:20 PM, Sven Barth via fpc-pascal < fpc-pascal@lists.freepascal.org> wrote: > > > > You're missing that FHook was declared as IHook, not THook. > > > > In terms of memo

Re: [fpc-pascal] Inclocked/declocked

2017-09-11 Thread Sven Barth via fpc-pascal
ch time you assign an array or pass it to a by-value parameter or if you change a value (cause the compiler/RTL needs to make sure that the reference to the array is unique then). Regards, Sven _______________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org h

Re: [fpc-pascal] Inclocked/declocked

2017-09-11 Thread Sven Barth via fpc-pascal
On 11.09.2017 11:46, Ryan Joseph wrote: > >> On Sep 11, 2017, at 4:20 PM, Sven Barth via fpc-pascal >> wrote: >> >> They're used for the reference counter of the array (or string or >> interface). The reference counter changes each time you assign

Re: [fpc-pascal] Inclocked/declocked

2017-09-11 Thread Sven Barth via fpc-pascal
Am 12.09.2017 06:54 schrieb "Ryan Joseph" : > > > > On Sep 12, 2017, at 2:35 AM, Sven Barth via fpc-pascal < fpc-pascal@lists.freepascal.org> wrote: > > > > I've rechecked and the thing is as follows: > > - the IncLocked call happens each tim

Re: [fpc-pascal] Comparison operator for generics

2017-09-11 Thread Sven Barth via fpc-pascal
nd; You could try to use the TEqualityComparer<> (or so) types from the rtl-generics package (don't know in which unit exactly they are ^^') as those can work with records without operator overloads. Regards, Sven ___ fpc-pascal maillist

Re: [fpc-pascal] Booleans vs sets

2017-09-22 Thread Sven Barth via fpc-pascal
Am 22.09.2017 12:56 schrieb "Ryan Joseph" : > > Got it, thanks guys. > > Btw, how can I know what the size in bytes these 2 options are? You could use SizeOf(YourType) and output the values in a simple test program :) Regards, Sven ________

Re: [fpc-pascal] Resource compilation

2017-09-24 Thread Sven Barth via fpc-pascal
roduced for Lazarus back before 1.0 or so. Regards, Sven ___________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Resource compilation

2017-09-24 Thread Sven Barth via fpc-pascal
here some sort of flag for this? I'd be fine with just recompiling the > resource file every time the unit is compiled, windres is fast enough... Please report a bug. Regards, Sven _______________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http:

Re: [fpc-pascal] Resource compilation

2017-09-24 Thread Sven Barth via fpc-pascal
On 24.09.2017 17:15, Graeme Geldenhuys wrote: > On 2017-09-24 13:50, Sven Barth via fpc-pascal wrote: >> You are aware that FPC supports resources on basically all platforms? > > I know that. What I meant is that FPC only ships with a Windows resource > compiler - ability to c

Re: [fpc-pascal] Resource compilation

2017-09-24 Thread Sven Barth via fpc-pascal
es not provide it. Exactly. Regards, Sven ___________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Syntax to select constant or variable with function call

2017-09-24 Thread Sven Barth via fpc-pascal
le will be: === output begin === 0..3 0..4 === output end === Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Resource compilation

2017-09-24 Thread Sven Barth via fpc-pascal
On 24.09.2017 22:55, Graeme Geldenhuys wrote: > On 2017-09-24 19:02, Sven Barth via fpc-pascal wrote: >>> system if you want to use it as a linker, fpc does not provide it. >> Exactly. > > Exactly my point! Why? Why does the official FPC installer for Windows > give a

Re: [fpc-pascal] Syntax to select constant or variable with function call

2017-09-25 Thread Sven Barth via fpc-pascal
ven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Resource compilation

2017-09-25 Thread Sven Barth via fpc-pascal
o essentially implement a C-preprocessor-compatible preprocessor. Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Managed properties idea

2017-10-04 Thread Sven Barth via fpc-pascal
nterfaces are automatically handled by the compiler is an added bonus. Regards, Sven ___________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Finding long file names

2017-10-05 Thread Sven Barth via fpc-pascal
r maybe it just never got fixed to handle valid files with more than one period? > > Any thoughts on this? I can't reproduce it here. Would you please provide a self contained, small example plus information about the OS, filesystem and compiler as well as a list of filenames to test with?

Re: [fpc-pascal] Managed properties idea

2017-10-06 Thread Sven Barth via fpc-pascal
; I don't know about "management operators". Could you explain more about them? Operators for records that are called when initializing, finalizing and copying that record. See $fpcdir/tests/test/tmoperator[1-10].pp Regards, Sven ___________

Re: [fpc-pascal] getting cross with the cross compiler

2017-10-07 Thread Sven Barth via fpc-pascal
> So where is my cross compiler ?? > > Thanks for any help and suggestions. A single compiler binary can always compile for all supported targets of that processor. So as long as all the units are available you simply need to pass "-Twin64" as additional parameter to compile for x86

Re: [fpc-pascal] getting cross with the cross compiler

2017-10-07 Thread Sven Barth via fpc-pascal
Am 07.10.2017 11:11 schrieb "Karoly Balogh (Charlie/SGR)" < char...@scenergy.dfmk.hu>: > > Hi, > > On Sat, 7 Oct 2017, Sven Barth via fpc-pascal wrote: > > > > So where is my cross compiler ?? > > > > > > Thanks for any help and suggestion

<    3   4   5   6   7   8   9   10   11   12   >