Re: [fpc-pascal] Unable to compile FPC after revision 36407

2017-06-03 Thread Michael Van Canneyt
On Sat, 3 Jun 2017, Victor Campillo wrote: On 03/06/17 20:02, Michael Van Canneyt wrote: I just did a 'make clean all PP=ppcx64-3.0.2' and that works fine ? Michael. I use "make clean all" also and I can compile revision 36406 without problems, my complete command to compile is

Re: [fpc-pascal] Unable to compile FPC after revision 36407

2017-06-03 Thread Michael Van Canneyt
On Sat, 3 Jun 2017, Michael Van Canneyt wrote: On Sat, 3 Jun 2017, Victor Campillo wrote: Hi, After revision 36407 I got this error trying to compile FPC. "Compilation of "BuildUnit_rtl_unicode.pp" failed" My system is Linux x86_64 and I am using FPC 3.0.2 to com

Re: [fpc-pascal] Unable to compile FPC after revision 36407

2017-06-03 Thread Michael Van Canneyt
On Sat, 3 Jun 2017, Victor Campillo wrote: Hi, After revision 36407 I got this error trying to compile FPC. "Compilation of "BuildUnit_rtl_unicode.pp" failed" My system is Linux x86_64 and I am using FPC 3.0.2 to compile trunk. I just did a 'make clean all PP=ppcx64-3.0.2' and that

Re: [fpc-pascal] named parameter

2017-05-27 Thread 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 <mich...@freepascal.org>: 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

Re: [fpc-pascal] named parameter

2017-05-27 Thread 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 for ALL kind of parameters, not just for Variants. When you have a function with many parameters having

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

2017-05-26 Thread Michael Van Canneyt
On Fri, 26 May 2017, Dennis wrote: I defined a generic TList //CORBA style interface var aInt : IMyInterface; aObj : TObject; begin aInt := MyList.Items[0]; aObj := aInt as TObject; writeln( IntToHex(LongWord(aInt),4)); writeln( IntToHex(LongWord(aObj),4)); //this will

Re: [fpc-pascal] download mirror is missing

2017-05-25 Thread Michael Van Canneyt
On Thu, 25 May 2017, Sven Barth via fpc-pascal wrote: 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"

Re: [fpc-pascal] download mirror is missing

2017-05-25 Thread Michael Van Canneyt
On Thu, 25 May 2017, Marco van de Voort wrote: In our previous episode, Michael Van Canneyt said: > Simply replacing the tcl bits would be enough. It seems a simple makefile > generator app. No way. I'm going to get rid of everything. If you have the time, perfect. The current

Re: [fpc-pascal] download mirror is missing

2017-05-25 Thread Michael Van Canneyt
On Thu, 25 May 2017, Marco van de Voort wrote: In our previous episode, Michael Van Canneyt said: >> >> http://freepascal.stack.nl/down/x86_64/linux-netherlands.html >> >> so it must be something in how the main site is updated. > > Who can update the down

Re: [fpc-pascal] download mirror is missing

2017-05-25 Thread Michael Van Canneyt
On Thu, 25 May 2017, Sven Barth via fpc-pascal wrote: Who can update the download page? I have regenerated it (I think). The website is created using Black Magic, it defies analysis. It's an ill-advised attempt to create a multilingual site. The person who made it is no longer on the

Re: [fpc-pascal] download mirror is missing

2017-05-25 Thread Michael Van Canneyt
On Thu, 25 May 2017, Mattias Gaertner wrote: On Wed, 24 May 2017 22:24:51 +0200 (CEST) mar...@stack.nl (Marco van de Voort) wrote: In our previous episode, Mattias Gaertner said: > > https://www.freepascal.org/down/x86_64/linux-netherlands.var > > 550 /pub/fpc/dist/3.0.2/x86_64-linux

Re: [fpc-pascal] Browser and exe

2017-05-24 Thread Michael Van Canneyt
On Tue, 23 May 2017, Marcos Douglas B. Santos wrote: 2. to make an app that will be a local web server, after the user has installed. The web real app could make requests to http//localhost and have a communication between them. I think this is your best option. Michael.

Re: [fpc-pascal] FPC Graphics options?

2017-05-18 Thread Michael Van Canneyt
On Thu, 18 May 2017, Graeme Geldenhuys wrote: On 2017-05-18 15:58, Reimar Grabowski wrote: A real game would be done differently and then FPC is fast. Oh, so work around the FPC problem. I get it now. ;-) Wanne do PacMan in 160x100 resolution, no problem for FPC. Check. Wanne do

Re: [fpc-pascal] FPC Graphics options?

2017-05-18 Thread Michael Van Canneyt
On Thu, 18 May 2017, Reimar Grabowski wrote: On Thu, 18 May 2017 21:00:48 +0700 Ryan Joseph wrote: That’s right. I’d really like to know what the hell FPC is doing to make it so slow (besides the call to Floor()). The compiler team should be worried about this

Re: [fpc-pascal] FPC Graphics options?

2017-05-18 Thread Michael Van Canneyt
On Thu, 18 May 2017, Reimar Grabowski wrote: On Thu, 18 May 2017 14:52:25 +0200 (CEST) Michael Van Canneyt <mich...@freepascal.org> wrote: > Why do you have to *calculate* *all*? Because you want to create an image ? That's what a ray-tracer does AFAIK. But raytracing isn't th

Re: [fpc-pascal] FPC Graphics options?

2017-05-18 Thread Michael Van Canneyt
On Thu, 18 May 2017, Reimar Grabowski wrote: compared to everything that the GPU has to do (a LOT more points and calculations), the CPU does relatively little in comparison. And still too much. So the question remains: Why do you have to *calculate* *all*? Because you want to create an

Re: [fpc-pascal] Size of program vs library ?

2017-05-17 Thread Michael Van Canneyt
On Wed, 17 May 2017, fredvs wrote: Michael Van Canneyt wrote You didn't even file an official request in the bugtracker ? Because I tried already and because I know the (rejected) answer. Where is this bugreport ? I was talking about earlier other requests. Each case is always

Re: [fpc-pascal] Size of program vs library ?

2017-05-17 Thread Michael Van Canneyt
On Wed, 17 May 2017, fredvs wrote: But, IMHO, if fpc uses a external linker, it is also part of the compilation process. And each feature of the linker should be analyzed. We are agreed on that. Michael Van Canneyt wrote You didn't even file an official request in the bugtracker

Re: [fpc-pascal] Size of program vs library ?

2017-05-17 Thread Michael Van Canneyt
On Wed, 17 May 2017, fredvs wrote: Hello. OK, I see that fpc team is afraid to change something that mom-Delphi did not do. This is simply not correct and a *very* unfair statement on your part. Mails like this will really not get you anywhere. 1. You didn't even file an official request

Re: [fpc-pascal] FPC Graphics options?

2017-05-17 Thread Michael Van Canneyt
On Wed, 17 May 2017, nore...@z505.com wrote: On 2017-05-17 02:57, mar...@stack.nl wrote: In our previous episode, nore...@z505.com said: i.e. if you end up using opengl, or its successor, why does it even matter if FPC pure games without any libs are slow? You still need to calculate all

Re: [fpc-pascal] List pre-defined defines

2017-05-16 Thread Michael Van Canneyt
On Tue, 16 May 2017, Jon Foster wrote: I've looked several times over the years for a way to get fpc to dump all of the predefined "defines" for the target selected. Things like "fpc", "linux", "unix", "android", "cpuarm", "cpui386", ... and who knows what else. Seems like there ought to be

Re: [fpc-pascal] Size of program vs library ?

2017-05-16 Thread Michael Van Canneyt
On Tue, 16 May 2017, fredvs wrote: Michael Van Canneyt wrote On Tue, 16 May 2017, fredvs wrote: Michael Van Canneyt wrote What can be misunderstood about adding --gc-sections to the linker options if -XX is used on the command-line ? Ha, the way you present it seems to show that you did

Re: [fpc-pascal] Size of program vs library ?

2017-05-16 Thread Michael Van Canneyt
On Tue, 16 May 2017, fredvs wrote: Michael Van Canneyt wrote What can be misunderstood about adding --gc-sections to the linker options if -XX is used on the command-line ? Ha, the way you present it seems to show that you did understand it ;-) OK, maybe is it time to add a feature

Re: [fpc-pascal] Size of program vs library ?

2017-05-16 Thread Michael Van Canneyt
On Tue, 16 May 2017, Henry Vermaak wrote: On Tue, May 16, 2017 at 01:15:34AM -0700, fredvs wrote: It works for all situations, so I propose that fpc add --gc-sections as parameter for the linker if the user has used -XX parameter to compile a library. Does it work for all situations? I

Re: [fpc-pascal] Size of program vs library ?

2017-05-16 Thread Michael Van Canneyt
On Tue, 16 May 2017, fredvs wrote: Maciej Izak wrote 2017-05-16 10:15 GMT+02:00 fredvs fiens@ : It works for all situations, so I propose that fpc add --gc-sections as parameter for the linker if the user has used -XX parameter to compile a library. for features requests please

Re: [fpc-pascal] Best way to check SimpleIPC for messages

2017-05-15 Thread Michael Van Canneyt
On Mon, 15 May 2017, nore...@z505.com wrote: On 2017-05-12 09:37, Michael Van Canneyt wrote: Obviously "avoid threads where possible" but only if there is a simpler mechanism not reinventing a thread. So it seems to me onidle in fpgui is a simpler way than creating a new separ

Re: [fpc-pascal] Size of program vs library ?

2017-05-15 Thread Michael Van Canneyt
On Mon, 15 May 2017, nore...@z505.com wrote: On 2017-05-15 04:19, Michael Van Canneyt wrote: If you want to compare today, you need to add the sizes of all the C libraries that are loaded during execution of a C program with the size of an FPC program. I think you'll find that the sizes

Re: [fpc-pascal] FPC 64bit for windows

2017-05-15 Thread Michael Van Canneyt
On Mon, 15 May 2017, wkitt...@windstream.net wrote: On 05/15/2017 07:41 AM, Graeme Geldenhuys wrote: But again, I don't know why the FPC team doesn't make an official full 64-bit Windows release?? IIRC, they say it is because 32bit winwhatever stuff will run on 64bit winwhatever stuff

Re: [fpc-pascal] Size of program vs library ?

2017-05-15 Thread Michael Van Canneyt
On Mon, 15 May 2017, fredvs wrote: http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal Ha, news, finally. Huh, did you read my post ? I did. I responded to the statement that fpc libraries are big and "unusable". It talk about smartlinking of libraries that does not work.

Re: [fpc-pascal] Size of program vs library ?

2017-05-15 Thread Michael Van Canneyt
On Mon, 15 May 2017, fredvs wrote: fredvs wrote Hello. Sorry to come back with this story but there are (good) news. Using * --gc-sections * makes the library smartlinked. So the question is: Why FPC does not provide * --gc-sections * to the linker with the -XX paramer for

Re: [fpc-pascal] Best way to check SimpleIPC for messages

2017-05-12 Thread Michael Van Canneyt
On Fri, 12 May 2017, nore...@z505.com wrote: Is the best general way to check IPC messages in SimpleIPC to spawn a thread? and check I noticed in fpgui sample apps that use simpleipc, graemeg checks the messages in the fpgui OnIdle event, AFAICT, not a separate thread. But what if you are

Re: [fpc-pascal] Vehicle management

2017-05-11 Thread Michael Van Canneyt
On Thu, 11 May 2017, Mark Morgan Lloyd wrote: On 11/05/17 08:30, Felipe Monteiro de Carvalho wrote: On Thu, May 11, 2017 at 1:19 AM, Jon Foster wrote:> Yeah. The wiki is cluttered with inaccurate and abandoned information for> Android development. It needs a

Re: [fpc-pascal] SimpleIPC examples in docs

2017-05-08 Thread Michael Van Canneyt
On Mon, 8 May 2017, nore...@z505.com wrote: On 2017-05-08 03:40, Graeme Geldenhuys wrote: On 2017-05-08 06:17, nore...@z505.com wrote: Or there could already be an examples feature in the docs that I don't know about. fpdoc already supports "Examples" for some years now - I use it very

Re: [fpc-pascal] machine readable grammar of object pascal?

2017-05-08 Thread Michael Van Canneyt
On Mon, 8 May 2017, Graeme Geldenhuys wrote: On 2017-05-08 09:49, Mattias Gaertner wrote: Was a typed const ever read only? And does CONSTANT in any other language mean writable? I think they have VAR for that. Maybe it's just the terminology used in FPC. This is not something invented

Re: [fpc-pascal] machine readable grammar of object pascal?

2017-05-08 Thread Michael Van Canneyt
On Mon, 8 May 2017, Mattias Gaertner wrote: On Mon, 8 May 2017 09:22:48 +0100 Graeme Geldenhuys wrote: On 2017-05-08 04:26, nore...@z505.com wrote: > which is like a variable, but called a const ;-) I'm slowly but surely loosing all hope for Object Pascal.

Re: [fpc-pascal] simpleIPC for all programming languages ?

2017-05-08 Thread Michael Van Canneyt
On Sun, 7 May 2017, nore...@z505.com wrote: Then some small questions arise: is it possible to statically link fpc code into other programs rather than it being a DLL? for example .a files instead of a dll at runtime? Then theoretically, IPC could be linked in statically, not just as a

Re: [fpc-pascal] SimpleIPC examples in docs

2017-05-08 Thread Michael Van Canneyt
On Mon, 8 May 2017, nore...@z505.com wrote: I thought I remember some simpleipc examples in the documentation a while ago (years ago).. Can't seem to find them in the current docs. You are probably talking about the ipc examples of the unix unit. Were they moved elsewhere or did I miss

Re: [fpc-pascal] simpleIPC strings

2017-05-08 Thread Michael Van Canneyt
On Mon, 8 May 2017, nore...@z505.com wrote: With simpleipc you can send a string. I am wondering what type of string is safe to send? i.e. what happens with utf8 or unicode? If both sender and receiver use the same defaultsystemcodepage, it should transfer fine. Is it meant to send a

Re: [fpc-pascal] silly question

2017-05-07 Thread Michael Van Canneyt
On Sun, 7 May 2017, duilio foschi wrote: I am have FPC v. 2.6.2 installed on linux/ubuntu server A. I am sure I did some change to zeos library in server A, but I cannot remember details. I'd like to have the same version of FPC installed on a new linux/ubuntu server B. I found that FPC

Re: [fpc-pascal] Patch for fpimage.inc

2017-05-05 Thread Michael Van Canneyt
On Fri, 5 May 2017, Graeme Geldenhuys wrote: Hi, I received notification of a patch (pull request) via my FPC Git mirror. The author has been notified to rather use Mantis, but seems to have some troubles registering. If anybody with FPC commit access wanted to take a look, the patch can be

Re: [fpc-pascal] Freevision etc.

2017-05-04 Thread Michael Van Canneyt
On Thu, 4 May 2017, Graeme Geldenhuys wrote: On 2017-05-04 13:21, Mark Morgan Lloyd wrote: text-mode console or over something really crude like telnet... and I hope you're doing that for fpGUI since you keep telling us how good it is :-) As I said, I do that often in my own (and

Re: [fpc-pascal] Can fpdoc insert macro values or compiler version information?

2017-05-03 Thread Michael Van Canneyt
On Wed, 3 May 2017, Graeme Geldenhuys wrote: Hi, Does FPDOC have the ability to inject the compiler version into RTL and FCL documentation? Something like FPC's macro variables or something. No, because it does not know this information. It has no way of knowing. At best it knows the

Re: [fpc-pascal] machine readable grammar of object pascal?

2017-05-03 Thread Michael Van Canneyt
On Wed, 3 May 2017, denisgolovan wrote: On 2017-05-03 00:53, Marc Santhoff wrote:  Does such grammar exist? Well, it depends on what you are trying to solve. If you want to parse Pascal using FPC - that's one way. If you want to get some king of AST using any available [command-line]

Re: [fpc-pascal] Is there some disadvantages using mode Delphi?

2017-04-29 Thread Michael Van Canneyt
On Sat, 29 Apr 2017, Marcos Douglas B. Santos wrote: Hi, I would like to write some packages that should work in FPC and Delphi. I know that I will need to use {mode delphi} to do that. My ask is: Is there some disadvantages using this mode? I mean, is there something that we only can do

Re: [fpc-pascal] Use a procedural type for declare a procedure\function

2017-04-20 Thread Michael Van Canneyt
On Wed, 19 Apr 2017, Andrey M, Zubarev wrote: Hi All, Why can't use procedural type for declare a procedure\function? Why ever allow the exact same signature? It's uncomfortable Maybe it makes sense to introduce into the language such a possibility? For example such code: [code] type

Re: [fpc-pascal] *** GMX Spamverdacht *** Re: WebAssembly Target

2017-04-20 Thread Michael Van Canneyt
On Thu, 20 Apr 2017, Graeme Geldenhuys wrote: On 2017-04-14 12:53, Michael Van Canneyt wrote: Why is it scripting needed to display a calendar? To display a popup menu, for example. But apparently you don’t need JavaScript for that either. Here is a blog post (dated 5 years ago) where

Re: [fpc-pascal] Coroutines and VirtualAlloc

2017-04-19 Thread Michael Van Canneyt
On Wed, 19 Apr 2017, Ryan Joseph wrote: On Apr 19, 2017, at 4:33 PM, Michael Van Canneyt <mich...@freepascal.org> wrote: Your reasoning contains a wrong assumption, namely that I is on the stack. If I is a register variable, then it is not on the stack, and will be reset with each l

Re: [fpc-pascal] Coroutines and VirtualAlloc

2017-04-19 Thread Michael Van Canneyt
On Wed, 19 Apr 2017, Sven Barth via fpc-pascal wrote: Am 19.04.2017 11:26 schrieb "Ryan Joseph" : On Apr 19, 2017, at 4:14 PM, Sven Barth via fpc-pascal < fpc-pascal@lists.freepascal.org> wrote: Those functions simply store (setjmp) and restore (longjmp)

Re: [fpc-pascal] Coroutines and VirtualAlloc

2017-04-19 Thread Michael Van Canneyt
On Wed, 19 Apr 2017, Ryan Joseph wrote: On Apr 19, 2017, at 4:14 PM, Sven Barth via fpc-pascal wrote: Those functions simply store (setjmp) and restore (longjmp) register values (and setjmp also returns the value passed to longjmp if it had been reached

Re: [fpc-pascal] *** GMX Spamverdacht *** Re: *** GMX Spamverdacht *** Re: WebAssembly Target

2017-04-14 Thread Michael Van Canneyt
On Fri, 14 Apr 2017, Jürgen Hestermann wrote: Am 2017-04-14 um 13:53 schrieb Michael Van Canneyt: >> Why is it scripting needed to display a calendar? > To display a popup menu, for example. > Or completion when typing in an edit: when you invite someone, it's handy > when ca

Re: [fpc-pascal] *** GMX Spamverdacht *** Re: WebAssembly Target

2017-04-14 Thread Michael Van Canneyt
On Fri, 14 Apr 2017, Jürgen Hestermann wrote: Am 2017-04-14 um 11:03 schrieb Michael Van Canneyt: > On Fri, 14 Apr 2017, Jürgen Hestermann wrote: >> Am 2017-04-13 um 10:20 schrieb Michael Schnell: >> > So at the moment HTML5 and Java script is the way to go, but WebAssemb

Re: [fpc-pascal] WebAssembly Target

2017-04-14 Thread Michael Van Canneyt
On Fri, 14 Apr 2017, Jürgen Hestermann wrote: Am 2017-04-13 um 10:20 schrieb Michael Schnell: > So at the moment HTML5 and Java script is the way to go, but WebAssembly should recreate Action Script versatility performance in a more "Standard" way. I hate Java Script and use NoScript to

Re: [fpc-pascal] Bls: WebAssembly Target

2017-04-13 Thread Michael Van Canneyt
On Thu, 13 Apr 2017, Mr Bee via fpc-pascal wrote: Pada Sabtu, 18 Maret 2017 0:54, Michael Van Canneyt <mich...@freepascal.org> menulis: You'll design a web app in the lazarus IDE (or Delphi IDE, for that matter). The app will be compiled to Javascript. Current th

Re: [fpc-pascal] Array clearing

2017-04-12 Thread Michael Van Canneyt
On Wed, 12 Apr 2017, Ryan Joseph wrote: On Apr 12, 2017, at 9:25 PM, Michael Van Canneyt <mich...@freepascal.org> wrote: Adding a pop/push requires compiler magic, and could be implemented; but the question is whether it is worth it, given the plethora of other options at your di

Re: [fpc-pascal] Array clearing

2017-04-12 Thread Michael Van Canneyt
On Wed, 12 Apr 2017, Jürgen Hestermann wrote: Am 2017-04-12 um 16:17 schrieb Ryan Joseph: > SetLength resizes the array in memory and “clear” means setting all values to default() for that type. "clear" is not very clear to me ;-) IMO SetLength(array,0) is clearing too. The function you

Re: [fpc-pascal] Array clearing

2017-04-12 Thread Michael Van Canneyt
On Wed, 12 Apr 2017, Ryan Joseph wrote: On Apr 12, 2017, at 8:05 PM, nore...@z505.com wrote: Since fillchar is not a general way to clear an item it almost seems like pascal needs a way to clear things generically, such as Array.clear But I guess this would be reinventing OOP, or Ruby

Re: [fpc-pascal] Hash List

2017-04-12 Thread Michael Van Canneyt
On Wed, 12 Apr 2017, nore...@z505.com wrote: On 2017-03-17 19:06, Giuliano Colla wrote: Il 18/03/2017 00:29, African Wild Dog ha scritto: Ia there any hash list implementation in free Pascal? The IniFiles unit (fpc/packages/fcl-base/src/inifiles.pp) provides a THashedStringList

Re: [fpc-pascal] sqldb create/free lifetime of object

2017-04-12 Thread Michael Van Canneyt
On Wed, 12 Apr 2017, LacaK wrote: Yes, example should be adjusted. Please report bug to not forget. The example is correct. All objects are freed. No need for a bugreport. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] sqldb create/free lifetime of object

2017-04-12 Thread Michael Van Canneyt
On Wed, 12 Apr 2017, Lars wrote: The sql query object and transaction object are created but not freed: http://www.freepascal.org/docs-html/fcl/sqldb/usingsqldb.html I think the docs should mention that the objects need not to be freed, as this violates normal programming practice of

Re: [fpc-pascal] SpVoice.GetVoices returned exception class EOleSysError

2017-04-11 Thread Michael Van Canneyt
On Sun, 9 Apr 2017, misabov wrote: The project has generated an exception class EOleSysError with a message: ?? ?? ??. uses ...,ComObj; var SpVoice: Variant; SpVoice := CreateOleObject('SAPI.SpVoice'); SpVoice.Voice:= SpVoice.GetVoices('','').Item(0); SpVoice GetVoices

Re: [fpc-pascal] Platform Dependent Integer Types

2017-04-07 Thread Michael Van Canneyt
On Fri, 7 Apr 2017, African Wild Dog wrote: 2017-04-07 12:10 GMT-03:00 Michael Van Canneyt <mich...@freepascal.org>: NativeInt and NativeUInt are indeed provided for Delphi compatibility. Which integer type to chose : That depends. What do you want to achieve exactly ? In Delphi

Re: [fpc-pascal] Platform Dependent Integer Types

2017-04-07 Thread Michael Van Canneyt
On Fri, 7 Apr 2017, African Wild Dog wrote: 2017-04-06 18:50 GMT-03:00 Mattias Gaertner : Why do you think that Delphi's longint has 64bits anywhere? Delphi's NativeInt is 32 or 64bit depending on platform.

Re: [fpc-pascal] Platform Dependent Integer Types

2017-04-07 Thread Michael Van Canneyt
On Fri, 7 Apr 2017, African Wild Dog wrote: 2017-04-07 11:15 GMT-03:00 Marco van de Voort : In our previous episode, African Wild Dog said: Which integer types have their size dependent on platform? E.g. in Delphi, LongInt can 32 or 64 bits depending on the platform. In

Re: [fpc-pascal] parameter list declaration

2017-04-01 Thread Michael Van Canneyt
On Sat, 1 Apr 2017, Mr Bee via fpc-pascal wrote: Hi all, I'm looking for official reference for function/procedure parameter list declaration in Pascal. I found this: http://www.freepascal.org/docs-html/ref/refse91.html but I think it's not really clear, especially for newbie. For example,

Re: [fpc-pascal] Call function in shared library from multiple threads

2017-03-31 Thread Michael Van Canneyt
On Fri, 31 Mar 2017, fredvs wrote: Hello. Michael Van Canneyt wrote To fix that, you can do the following. In the library startup code, create a dummy thread. This will initialize the threads mechanism: with TThread.Create(False) do end. I use this for initialize my libraries

Re: [fpc-pascal] Call function in shared library from multiple threads

2017-03-31 Thread Michael Van Canneyt
On Thu, 30 Mar 2017, Michael Van Canneyt wrote: On Thu, 30 Mar 2017, Krzysztof wrote: 2017-03-30 15:19 GMT+02:00 Michael Van Canneyt <mich...@freepascal.org> Nevertheless, that should work. I've used it in multi-threaded apache modules. Well it doesn't work or fpjson

Re: [fpc-pascal] Call function in shared library from multiple threads

2017-03-30 Thread Michael Van Canneyt
On Thu, 30 Mar 2017, Krzysztof wrote: 2017-03-30 15:19 GMT+02:00 Michael Van Canneyt <mich...@freepascal.org> Nevertheless, that should work. I've used it in multi-threaded apache modules. Well it doesn't work or fpjson module is not thread safe in this case. You ca

Re: [fpc-pascal] Call function in shared library from multiple threads

2017-03-30 Thread Michael Van Canneyt
On Thu, 30 Mar 2017, Michael Van Canneyt wrote: On Thu, 30 Mar 2017, Krzysztof wrote: Yes, I'm aware of cthreads and tested it too (without it also critical sections don't work) but it doesn't help with attached examples. Still same errors in logs Nevertheless, that should work. I

Re: [fpc-pascal] Call function in shared library from multiple threads

2017-03-30 Thread Michael Van Canneyt
On Thu, 30 Mar 2017, Krzysztof wrote: Yes, I'm aware of cthreads and tested it too (without it also critical sections don't work) but it doesn't help with attached examples. Still same errors in logs Nevertheless, that should work. I've used it in multi-threaded apache modules. Michael.

Re: [fpc-pascal] Questions About Constructors

2017-03-30 Thread Michael Van Canneyt
On Thu, 30 Mar 2017, African Wild Dog wrote: Hello, 1 - What happens if my constructor raise an exception? Is my destructor automatically called? Yes. 2 - Are the class fields automatically initialized to Default(T) just like in Delphi? Yes. The're zeroed out when the memory for the

Re: [fpc-pascal] Threading vs Parallelism ?

2017-03-29 Thread Michael Van Canneyt
On Wed, 29 Mar 2017, Dimitrios Chr. Ioannidis via fpc-pascal wrote: Hi, On 29/3/2017 9:57 μμ, fredvs wrote: Hello. Some developers treat me as dinosaur because I use threads in place of doing parallelism. Huh, ok, but why parallelism is better and how to do it with fpc ? a nice

Re: [fpc-pascal] INVALID_SOCKET constant not defined for Linux

2017-03-28 Thread Michael Van Canneyt
On Tue, 28 Mar 2017, LacaK wrote: Hi, I am porting application from Windows to Linux. I use Sockets unit. There is defined on Windows (and also on BeOS, FreeBSD, OS2): INVALID_SOCKET = TSocket(Not 0); // or -1 SOCKET_ERROR = -1; But not for Linux. Does it means, that result of

Re: [fpc-pascal] TSQLQuery and buffering.

2017-03-27 Thread Michael Van Canneyt
On Mon, 27 Mar 2017, Gary Doades wrote: Indeed, that's why I can't currently see where the problem lies. It shouldn't buffer the rows/records, but it does... or at least something does and I'm pretty sure it's not my program. The DB-client library maybe? Yup! I was running some other

Re: [fpc-pascal] TSQLQuery and buffering.

2017-03-26 Thread Michael Van Canneyt
r On Sat, 25 Mar 2017, Martin Schreiber wrote: On Saturday 25 March 2017 10:28:37 Michael Van Canneyt wrote: On Sat, 25 Mar 2017, Martin Schreiber wrote: > On Saturday 25 March 2017 09:32:33 Gary Doades wrote: >> I Understand about the "normal" use of TSQLQuery and data set

Re: [fpc-pascal] TSQLQuery and buffering.

2017-03-26 Thread Michael Van Canneyt
On Sat, 25 Mar 2017, Gary Doades wrote: I had read about UniDirectional and I have indeed tried this. It doesn't seem to make any significant difference. Looking through the source code for TBufDataset it looks like UniDirectional just turns off building various indexes/structures etc. and

Re: [fpc-pascal] TSQLQuery and buffering.

2017-03-25 Thread Michael Van Canneyt
On Sat, 25 Mar 2017, Gary Doades wrote: On Fri, 24 Mar 2017, Gary Doades wrote: Really, the question is simple: Is there ANY way of TSQLQuery NOT reading the entire result set into memory? Set Unidirectional to True, and it will keep only 1 row in memory. When you are simply scanning

Re: [fpc-pascal] TSQLQuery and buffering.

2017-03-25 Thread Michael Van Canneyt
On Sat, 25 Mar 2017, Martin Schreiber wrote: On Saturday 25 March 2017 09:32:33 Gary Doades wrote: I Understand about the "normal" use of TSQLQuery and data sets and I also use this for small result set that need the data changing some way and writing back to the DB. What I need now is an

Re: [fpc-pascal] TSQLQuery and buffering.

2017-03-25 Thread Michael Van Canneyt
On Fri, 24 Mar 2017, Gary Doades wrote: Hi everyone, Firstly, I realise this is an old subject, but I still can't find any easy answer. Really, the question is simple: Is there ANY way of TSQLQuery NOT reading the entire result set into memory? Set Unidirectional to True, and it will

Re: [fpc-pascal] Delphi RTTI vs Free Pascal RTTI

2017-03-24 Thread Michael Van Canneyt
On Fri, 24 Mar 2017, African Wild Dog wrote: Hello, I need to write a code compatilble with both free pascal and delphi using the old style RTTI. What are the diferences between delphi's and free pascal's approach/types? I took a look at delphi's and fpc's TypInfo unit and it looks like the

Re: [fpc-pascal] Delphi for Linux is out

2017-03-23 Thread Michael Van Canneyt
On Thu, 23 Mar 2017, Zoë Peterson wrote: On 3/23/2017 12:31 PM, Marco van de Voort wrote: It didn't help that some component maintainers like Synapse stuck to the libc format way too long. Only in 2007-2009 when FPC on OS X got important that changed, I still use Indy(10) that switched much

Re: [fpc-pascal] Delphi for Linux is out

2017-03-23 Thread Michael Van Canneyt
On Thu, 23 Mar 2017, Mattias Gaertner wrote: On Thu, 23 Mar 2017 16:08:20 +0100 (CET) Michael Van Canneyt <mich...@freepascal.org> wrote: [...] > When did FPC start to run on Linux? 1999? I got the first "hello world" around 1995-1996, I think, together with Mark May

Re: [fpc-pascal] Delphi for Linux is out

2017-03-23 Thread Michael Van Canneyt
On Thu, 23 Mar 2017, Mattias Gaertner wrote: On Thu, 23 Mar 2017 13:15:20 +0100 (CET) "Karoly Balogh (Charlie/SGR)" wrote: Hi, On Thu, 23 Mar 2017, Graeme Geldenhuys wrote: > Just thought I would mention, yesterday Delphi 10.2 was released which > includes Linux

Re: [fpc-pascal] rtl-generics vs fgl

2017-03-19 Thread Michael Van Canneyt
On Sun, 19 Mar 2017, Graeme Geldenhuys wrote: Hi, Sorry if this is a silly question, I didn't really follow Generics discussions in the past. If the "rtl-generics" package a replacement for the fgl unit? No, it is for Delphi compatibility. It contains also more classes/templates. Going

Re: [fpc-pascal] TThread.OnTerminate ?

2017-03-18 Thread Michael Van Canneyt
On Sat, 18 Mar 2017, fredvs wrote: Hello. Does it exist a equivalent of the Delphi TThread.OnTerminate ? http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/delphivclwin32/Classes_TThread_OnTerminate.html I do not see it in fpc (or I miss something). You

Re: [fpc-pascal] WebAssembly Target

2017-03-17 Thread Michael Van Canneyt
On Fri, 17 Mar 2017, Daniel Gaspary wrote: On Fri, Mar 17, 2017 at 5:16 AM, Michael Van Canneyt <mich...@freepascal.org> wrote: In fact, there is an alternate approach, transpiling pascal to Javascript. It's much farther ahead than the webassembly target, already produces programs r

Re: [fpc-pascal] WebAssembly Target

2017-03-17 Thread Michael Van Canneyt
On Fri, 17 Mar 2017, Daniel Gaspary wrote: On Fri, Mar 17, 2017 at 5:16 AM, Michael Van Canneyt <mich...@freepascal.org> wrote: In fact, there is an alternate approach, transpiling pascal to Javascript. It's much farther ahead than the webassembly target, already produces programs r

Re: [fpc-pascal] Thread Variables Initial Values

2017-03-17 Thread Michael Van Canneyt
On Fri, 17 Mar 2017, African Wild Dog wrote: Hello, The documentation is not clear about the initial values of thread variables: *"If threads are used then a copy is made for each thread (including the main thread). Note that the copy is made with the original value of the variable, not

Re: [fpc-pascal] WebAssembly Target

2017-03-17 Thread Michael Van Canneyt
On Fri, 17 Mar 2017, Karoly Balogh (Charlie/SGR) wrote: Hi, On Fri, 17 Mar 2017, Michael Van Canneyt wrote: In fact, there is an alternate approach, transpiling pascal to Javascript. It's much farther ahead than the webassembly target, already produces programs running in the browser

Re: [fpc-pascal] WebAssembly Target

2017-03-17 Thread Michael Van Canneyt
On Thu, 16 Mar 2017, Michael Schnell wrote: On 15.03.2017 17:58, Karoly Balogh (Charlie/SGR) wrote: Well, "degree of success" is relative, ... Anyway, it's great to know that you are watching the proceedings regarding WebAssembly, and already did some effort to get started Just for

Re: [fpc-pascal] Threadvar member field

2017-03-16 Thread Michael Van Canneyt
On Thu, 16 Mar 2017, African Wild Dog wrote: I have a class where its instances are shared between multiple threads. How can I declare one variable per instance per thread? The code below does not compile (fpc 3.0.0): TMyClass = class public threadvar MyValue: Integer; end; This is not

Re: [fpc-pascal] WebAssembly Target

2017-03-16 Thread Michael Van Canneyt
On Thu, 16 Mar 2017, Graeme Geldenhuys wrote: On 2017-03-16 14:45, Karoly Balogh (Charlie/SGR) wrote: I think there's still a master switch to disable this in the browsers. So far Firefox 52 has none. Not in the Preferences, and not in about:config either. But yeah, it is early days, so

Re: [fpc-pascal] WebAssembly Target

2017-03-11 Thread Michael Van Canneyt
On Sat, 11 Mar 2017, Daniel Gaspary wrote: Hi, Is there something planned in this matter for FPC? I was reading about the new Firefox making WebAssembly publicly available ("On Tuesday Firefox 52 became the first browser to support WebAssembly

Re: [fpc-pascal] how to determine if a class has descendant registered within the current program

2017-03-08 Thread Michael Van Canneyt
On Wed, 8 Mar 2017, Graeme Geldenhuys wrote: On 2017-03-08 10:55, Michael Van Canneyt wrote: Currently not, but I think that Sven Barth will implement something for the new RTTI which will make this possible in the future. That should be handy for the class documentation too, being able

Re: [fpc-pascal] how to determine if a class has descendant registered within the current program

2017-03-08 Thread Michael Van Canneyt
On Wed, 8 Mar 2017, Dennis wrote: I have a many classes, one inherits from another one, in an ancestor method, I want to test whether the calling class is a childless class. e.g. class function TAncestor.GetCaption : String; //virtual begin if HasChild then result := 'something'

Re: [fpc-pascal] Adding a array of float in ressource and use it ?

2017-03-07 Thread Michael Van Canneyt
On Tue, 7 Mar 2017, Sven Barth via fpc-pascal wrote: Am 07.03.2017 13:49 schrieb "fredvs" : To access a file stored as a resource you need to use TResourceStream. Ho my Dog, I did not know this one. More than perfect, many thanks Sven. PS: About array of float into

Re: [fpc-pascal] Adding a array of float in ressource and use it ?

2017-03-06 Thread Michael Van Canneyt
On Mon, 6 Mar 2017, Lukasz Sokol wrote: On 06/03/17 14:50, fredvs wrote: I don't know. By all logic, it should not work either. OK, It comes from a "lucky" bug (thanks to reveal it). There was a setlength(buffer, length(buffer) * channels) not needed. Ok, fixed. But the problem remain:

Re: [fpc-pascal] Adding a array of float in ressource and use it ?

2017-03-06 Thread Michael Van Canneyt
On Mon, 6 Mar 2017, fredvs wrote: I don't know. By all logic, it should not work either. OK, It comes from a "lucky" bug (thanks to reveal it). There was a setlength(buffer, length(buffer) * channels) not needed. Ok, fixed. But the problem remain: If data are int16 or int32: OK, the file

Re: [fpc-pascal] Adding a array of float in ressource and use it ?

2017-03-06 Thread Michael Van Canneyt
On Mon, 6 Mar 2017, fredvs wrote: Hello Michael and thanks for answer. You must write FileBuffer.Data.WriteBuffer(buffer[0],Length(Buffer)*Sizeof(Float)); Ha, perfect, many thanks. But there is something that I do not catch, why is it working for integer ? Sizeof Integer is 2 bits so,

Re: [fpc-pascal] Feature announcement: Management Operators

2017-03-04 Thread Michael Van Canneyt
On Sat, 4 Mar 2017, nore...@z505.com wrote: On 2017-02-28 14:48, Jonas Maebe wrote: On 28/02/17 21:40, nore...@z505.com wrote: What happens with a stack allocated record? (no new() required, nor dispose() so is the record ever initialized/finalized?) Yes, just like records that contain

Re: [fpc-pascal] Manual sources? Some doc questions.

2017-03-03 Thread Michael Van Canneyt
On Fri, 3 Mar 2017, Hans-Peter Suter wrote: I couldn't find the source for the manuals, e.g. [prog.pdf]( http://www.freepascal.org/docs.var). Does someone know where I can find them? in subversion. See http://www.freepascal.org/develop.var Section 'Other repositories' Some other

<    7   8   9   10   11   12   13   14   15   16   >