Re: [fpc-pascal] readonly variables

2009-11-29 Thread Ivo Steinmann
Anthony Walter schrieb: I don't care if you claim to have written documentation, you clearly either don't have a grasp of the English language, good memory, research skills, or some combination those deficiencies. Michael and so Jonas are Authors and Developers of FPC. Most FPC Authors are

Re: [fpc-pascal] readonly variables

2009-11-29 Thread Bart
Can we please not start bashing people here? (Cuuntry of origin: Netherlands, so not a native English speaker as well) ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] readonly variables

2009-11-29 Thread Florian Klaempfl
Anthony Walter schrieb: Okay, I am going to call bullshit on you. What about just unsubscribing from the list? Nobody needs you here. MvC did an incredible job on FPC docs, you just waste our time. ___ fpc-pascal maillist -

Re: [fpc-pascal] readonly variables

2009-11-29 Thread Mehmet Erol Sanliturk
Florian Klaempfl wrote: Anthony Walter schrieb: Okay, I am going to call bullshit on you. What about just unsubscribing from the list? Nobody needs you here. MvC did an incredible job on FPC docs, you just waste our time. Actually it is a very ridiculous behavior to talk about developers

Re: [fpc-pascal] readonly variables

2009-11-29 Thread patspiper
Anthony Walter wrote: Okay, I am going to call bullshit on you. I, like many others in this list, resent your unwarranted behavior towards Michael Van Canneyt. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] (Generic) Container Classes

2009-11-29 Thread Juha Manninen
Uhh... Is the class TFPStringHashTable (and TFPCustomHashTable) actually doing a hashmap? The ported JCL StringHashMap is duplicate effort then after all. Juha Manninen ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] readonly variables

2009-11-29 Thread Jonas Maebe
On 28 Nov 2009, at 22:34, Michael Van Canneyt wrote: It was Jonas Maebe (Jonas, correct me if I'm wrong) who pointed out (already some time ago) that this behaviour is purely coincidental (but admittedly convenient), and should not be taken for granted. That's correct, Usually, this is

Re: [fpc-pascal] readonly variables

2009-11-29 Thread Xgelb
Hi Jürgen, Not that I am aware of. But for what reason do you want such a behaviour? I wrote data analysis programs which are very difficult. I change some lines to optimize a program. Somethimes it is necessary that I will save a variable after an input because the second setup of the variable

Re: [fpc-pascal] readonly variables

2009-11-29 Thread Jonas Maebe
On 28 Nov 2009, at 23:31, Anthony Walter wrote: This second time regarding the current discussion you said: This is not guaranteed in any way. and nowhere it says in the Pascal language specification that this is guaranteed by the compiler And I responded with the section, subsection, page

Re: [fpc-pascal] readonly variables

2009-11-29 Thread Anthony Walter
Jonas, Thank you. I certainly will make an attempt to tone down a few of my remarks which I admit were inflammatory. I assure everyone here though, my purpose in conversing on these lists is to help improve FPC, so far by discussing easy to resolve and reproduce technical points. I personally

Re: [fpc-pascal] readonly variables

2009-11-29 Thread Micha Nelissen
Anthony Walter wrote: Having said all that, Jonas, what is the actual implemented behaviour of FPC? Does it 0 initialize heap memory at startup or not? If not, what is the justification for not doing so when this has been a long established behaviour of Delphi? It's not the compiler or RTL

Re: [fpc-pascal] readonly variables

2009-11-29 Thread Jonas Maebe
On 29 Nov 2009, at 16:51, Anthony Walter wrote: Having said all that, Jonas, what is the actual implemented behaviour of FPC? Does it 0 initialize heap memory at startup or not? I guess you mean global data rather than heap (heap is what is handled by getmem/freemem/..., and there are no

Re: [fpc-pascal] readonly variables

2009-11-29 Thread Anthony Walter
FPC currently initialises the global data to 0 on platforms that do not do this by themselves. When it turns global variables into register variables, it will also initialise such registers with 0. Ah, okay. So it is working as expected. Thanks for the reply.

Re: [fpc-pascal] readonly variables

2009-11-29 Thread Michael Van Canneyt
On Sun, 29 Nov 2009, Anthony Walter wrote: Jonas, Thank you. I certainly will make an attempt to tone down a few of my remarks which I admit were inflammatory. I assure everyone here though, my purpose in conversing on these lists is to help improve FPC, so far by discussing easy to resolve

Re: [fpc-pascal] readonly variables

2009-11-29 Thread Mehmet Erol Sanliturk
Micha Nelissen wrote: Anthony Walter wrote: Having said all that, Jonas, what is the actual implemented behaviour of FPC? Does it 0 initialize heap memory at startup or not? If not, what is the justification for not doing so when this has been a long established behaviour of Delphi? It's not

Re: [fpc-pascal] readonly variables

2009-11-29 Thread Jonas Maebe
On 29 Nov 2009, at 19:20, Mehmet Erol Sanliturk wrote: My experience with Windows XP Professional is that it is NOT zeroing the memory . I know this from actual Delphi ( and also Free Pascal ) compiled program executions . Due to this I am explicitly initializing all of the local simple

Re: [fpc-pascal] (Generic) Container Classes

2009-11-29 Thread Juha Manninen
On sunnuntai, 29. marraskuuta 2009 21:27:39 Vincent Snijders wrote: Juha Manninen schreef: Uhh... Is the class TFPStringHashTable (and TFPCustomHashTable) actually doing a hashmap? The ported JCL StringHashMap is duplicate effort then after all. Here is the docs:

Re: [fpc-pascal] (Generic) Container Classes

2009-11-29 Thread Vincent Snijders
Juha Manninen schreef: What about the generic containers? I guess it has not been planned yet. There are some in the fgl unit in the RTL. As far as I can see, they are not yet documented. Vincent ___ fpc-pascal maillist -

Re: [fpc-pascal] readonly variables

2009-11-29 Thread Mehmet Erol Sanliturk
Jonas Maebe wrote: On 29 Nov 2009, at 19:20, Mehmet Erol Sanliturk wrote: My experience with Windows XP Professional is that it is NOT zeroing the memory . I know this from actual Delphi ( and also Free Pascal ) compiled program executions . Due to this I am explicitly initializing all of

Re: [fpc-pascal] readonly variables

2009-11-29 Thread M Pulis
On Nov 28, 2009, at 1:15 PM, Anthony Walter wrote: This is not guaranteed in any way. It happens to be so most of the time, but your code should never assume this is so, except for global Ansistring variables. If all globals weren't initialized to 0 a lot of code from lots of people

Re: [fpc-pascal] readonly variables

2009-11-29 Thread Frank Peelo
Anthony Walter wrote: Okay, I am going to call bullshit on you. This is the second time (in a few weeks) where you've replied to something I've written with wrong information. This first time concerning the topic const records passed incorrectly you said, It is nowhere written in the Delphi

Re: [fpc-pascal] readonly variables

2009-11-29 Thread Jonas Maebe
On 29 Nov 2009, at 22:59, Anthony Walter wrote: Do you mean this one? Using const allows the compiler to optimize code for structured- and string-type parameters. Allows is not the same as forces. This line in the help file does not say that const parameters are passed by reference. It

Re: [fpc-pascal] readonly variables

2009-11-29 Thread Anthony Walter
So it seems that passing them by value actually corresponds to what the Delphi docs say. Jonas, I agree, the documentation definitely does address the issue, which was where that conversation was derailed. Regarding actual implementation, I previously posted the full source to a test program

Re: [fpc-pascal] readonly variables

2009-11-29 Thread Jorge Aldo G. de F. Junior
This is quite simple : 1 - Imagine that fpc initializes all memory to 0. 2 - Imagine that you are running on a low power platform. 3 - You are not going to use the default value of 0. 4 - You reinitialize the memory to your own default value. See, you did TWO memory store instructions instead of

Re: [fpc-pascal] (Generic) Container Classes

2009-11-29 Thread leledumbo
What about the generic containers? I guess it has not been planned yet. There are some in the fgl unit in the RTL. As far as I can see, they are not yet documented. I've used it in some occasions and it works very well (except for that ifdef-ed Assign method, that also affects recursive