Re: [fpc-pascal] Is there a StringRefCount() equivalence?

2010-04-30 Thread Juha Manninen
Hi, > There are use cases for this. > A while ago I thinking about a string-hash table as a cache for strings. I have done that. Then I needed to inspect the reference count for debugging and configuration purposes. I didn't know there is StringRefCount() function so I also counted the string t

Re: [fpc-pascal] TCgiApplication in cgiapp unit - mostly deprecated

2010-04-30 Thread Graeme Geldenhuys
On 30 April 2010 18:05, Marcos Douglas wrote: > > What about FastCGI, is there an implementation default in FPC? I haven't used FastCGI yet, but there seems to be an implementation included with FPC. /packages/fastcgi/* > I want codify a web app and I think use FreePascal. You recommend > t

Re: [fpc-pascal] method order

2010-04-30 Thread Mattias Gaertner
On Fri, 30 Apr 2010 18:34:43 +0200 spir ☣ wrote: > (Note: I use "method" for "either procedure or function"; if there is a > proper term, please tell me --I don't know any.) Normally: method = function/procedure of a class with an instance 'Self' class method = method where Self is the class

[fpc-pascal] method order

2010-04-30 Thread spir ☣
(Note: I use "method" for "either procedure or function"; if there is a proper term, please tell me --I don't know any.) Hello, A short question: Why must a called method be defined before the caller, since it will be called only at runtime? Also: what is the trick then (on the implementation s

[fpc-pascal] TCgiApplication in cgiapp unit - mostly deprecated

2010-04-30 Thread Marcos Douglas
Hi all, On Fri, 27 Nov 2009, Michael Van Canneyt wrote: > > On Fri, 27 Nov 2009, Graeme Geldenhuys wrote: > > Hi, > > > > Most of the methods in TCgiApplication (located in cgiapp unit) is > > marked as deprecated. There is no documentation for this unit, so I do > > not know much about it. > > >

Re: [fpc-pascal] var parameter

2010-04-30 Thread cobines
2010/4/30 spir ☣ : > Hello, > > I wrote a little simulation prog to try and understand better the semantics > of var parameters (see below code and output). > > It seems they behave like if passed via pointers, but also locally _operated_ > via pointers. Meaning there is in ChangeVar no real loca

Re: [fpc-pascal] compilation feeback

2010-04-30 Thread Jonas Maebe
On 30 Apr 2010, at 10:51, spir ☣ wrote: Isnt't it possible to switch off specific (types of) ld warnings? As far as I know, it is not. Jonas___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fp

[fpc-pascal] var parameter

2010-04-30 Thread spir ☣
Hello, I wrote a little simulation prog to try and understand better the semantics of var parameters (see below code and output). It seems they behave like if passed via pointers, but also locally _operated_ via pointers. Meaning there is in ChangeVar no real local variable n (on the stack). B

Re: [fpc-pascal] Is there a StringRefCount() equivalence?

2010-04-30 Thread Martin
On 30/04/2010 09:22, dmitry boyarintsev wrote: On Fri, Apr 30, 2010 at 7:42 AM, Bihar Anwar wrote: I hope FPC developers will include StringRefCount() to the RTL. Why would you need that? There are use cases for this. A while ago I thinking about a string-hash table as a cache

Re: [fpc-pascal] Is there a StringRefCount() equivalence?

2010-04-30 Thread dmitry boyarintsev
On Fri, Apr 30, 2010 at 1:18 PM, Bihar Anwar wrote: > Because there are few certain condition when we need to observe what happened > to ansistring/unicodestring variable. In my case now, I need it to learn how > reference counting works. For example, using Move() on ref-counted string > type i

Re: [fpc-pascal] Is there a StringRefCount() equivalence?

2010-04-30 Thread Bihar Anwar
Because there are few certain condition when we need to observe what happened to ansistring/unicodestring variable. In my case now, I need it to learn how reference counting works. For example, using Move() on ref-counted string type is considered danger unless we do it properly, and I need to v

Re: [fpc-pascal] Is there a StringRefCount() equivalence?

2010-04-30 Thread Bihar Anwar
Thanks Jonas for your advice. - Original Message From: Jonas Maebe To: FPC-Pascal users discussions Sent: Fri, April 30, 2010 2:37:23 PM Subject: Re: [fpc-pascal] Is there a StringRefCount() equivalence? On 30 Apr 2010, at 05:42, Bihar Anwar wrote: > By the way, how do I call inter

Re: [fpc-pascal] compilation feeback

2010-04-30 Thread spir ☣
On Fri, 30 Apr 2010 09:51:44 +0200 Jonas Maebe wrote: > > On 30 Apr 2010, at 09:40, spir ☣ wrote: > > > -1- "local" variable > > When a program-global variable is unused, the compiler message reads > > 'Note: Local variable "x" not used'. > > Is this a mistake or do I misunderstand some point

Re: [fpc-pascal] compilation feeback

2010-04-30 Thread spir ☣
On Fri, 30 Apr 2010 09:52:44 +0200 Graeme Geldenhuys wrote: > > '/use/bin/ld: warning: link.res contains output sections; did you forget > > -T?' > > What does this mean? > > I get this often, and also don't have a clue what it means. Yet our > applications still seem to run fine. Go figure??

Re: [fpc-pascal] Is there a StringRefCount() equivalence?

2010-04-30 Thread dmitry boyarintsev
On Fri, Apr 30, 2010 at 7:42 AM, Bihar Anwar wrote: > I hope FPC developers will include StringRefCount() to the RTL. Why would you need that? thanks, Dmitry ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailma

Re: [fpc-pascal] compilation feeback

2010-04-30 Thread Jonas Maebe
On 30 Apr 2010, at 09:40, spir ☣ wrote: -1- "local" variable When a program-global variable is unused, the compiler message reads 'Note: Local variable "x" not used'. Is this a mistake or do I misunderstand some point? Such variables are local to the current program or to the unit (in ca

Re: [fpc-pascal] Is there a StringRefCount() equivalence?

2010-04-30 Thread Jonas Maebe
On 30 Apr 2010, at 05:42, Bihar Anwar wrote: By the way, how do I call internal compiler functions directly (maybe using a tricky way) such as system.fpc_ansistr_incr_ref() and system.fpc_ansistr_decr_ref? I couldn't call those kind of functions from my program, I guest it is caused by

Re: [fpc-pascal] compilation feeback

2010-04-30 Thread Graeme Geldenhuys
spir ☣ het geskryf: > > -3- linker message > I systematically get > '/use/bin/ld: warning: link.res contains output sections; did you forget -T?' > What does this mean? I get this often, and also don't have a clue what it means. Yet our applications still seem to run fine. Go figure?? :-/ I'm us

[fpc-pascal] compilation feeback

2010-04-30 Thread spir ☣
Hello, 3 little questions about messages: -1- "local" variable When a program-global variable is unused, the compiler message reads 'Note: Local variable "x" not used'. Is this a mistake or do I misunderstand some point? -2- place of error messages In the output, warnings seem to always come be