Re: [fpc-devel] va(r)_arg vs open array

2006-10-05 Thread ik
On 10/5/06, Bisma Jayadi [EMAIL PROTECTED] wrote: For example: If this is really the case that cause you demand var_args feature, then obviously you have problem with your software design. I agree with Marco. :) I wrote a program to solve a problem exactly like this without need of var_args

Re: [fpc-devel] va(r)_arg vs open array

2006-10-04 Thread Bisma Jayadi
For example: %d/%d/%d (dd/mm/) Hello %s(Mr). %s (Van Der Voot), Thank you for interesting in our %s(product). %s (Marco) we are more then happy to help you and give you additional information about %s (product). You can either call us at the phone number of 1234567890 extension %d (1)

Re: [fpc-devel] va(r)_arg vs open array

2006-10-03 Thread Marco van de Voort
On 10/2/06, Marco van de Voort [EMAIL PROTECTED] wrote: The type of a is secure in the second part, and it is faster. Keep in mind that more elaborate syntax increases the chance of copying/referencecount changing etc etc. E.g. the standard example is printf. There the first type must

Re: [fpc-devel] va(r)_arg vs open array

2006-10-03 Thread Michael Van Canneyt
On Tue, 3 Oct 2006, Marco van de Voort wrote: But the response is not correct. For example, I do not like the fact in VB that I must use , without parameter if I don't' want to use this parameters. But probably there will be a reason. Some form of disambiguation that this comma

Re: [fpc-devel] va(r)_arg vs open array

2006-10-03 Thread ik
On 10/2/06, Daniël Mantione [EMAIL PROTECTED] wrote: Op Mon, 2 Oct 2006, schreef ik: Well, I think that this is also a functional thing. * Syntactically, both methods can be safe. * Syntactically, the FPC/Delphi one is more powerfull. Well take a look at the way Java

Re: [fpc-devel] va(r)_arg vs open array

2006-10-03 Thread ik
On 10/3/06, Marco van de Voort [EMAIL PROTECTED] wrote: On 10/2/06, Marco van de Voort [EMAIL PROTECTED] wrote: The type of a is secure in the second part, and it is faster. Keep in mind that more elaborate syntax increases the chance of copying/referencecount changing etc etc. E.g.

Re: [fpc-devel] va(r)_arg vs open array

2006-10-03 Thread Marco van de Voort
On 10/3/06, Marco van de Voort [EMAIL PROTECTED] wrote: I agree here, but as I said (I hope), you need some sort of compiler directive to enable such thing. By default it should accept only []. I agree with that. And as I said before, this is a petty thing only. Not every

Re: [fpc-devel] va(r)_arg vs open array

2006-10-02 Thread Daniël Mantione
Op Mon, 2 Oct 2006, schreef ik: Hi, I'm wondering why Pascal as a language (and FPC with it's extensions) does not support va_args (or var_args in the java language). It does: array of const. If you declare a procedure cdecl it is even binary compatible with a C varargs. Now we have

Re: [fpc-devel] va(r)_arg vs open array

2006-10-02 Thread ik
On 10/2/06, Daniël Mantione [EMAIL PROTECTED] wrote: Op Mon, 2 Oct 2006, schreef ik: Hi, I'm wondering why Pascal as a language (and FPC with it's extensions) does not support va_args (or var_args in the java language). It does: array of const. If you declare a procedure cdecl it is even

Re: [fpc-devel] va(r)_arg vs open array

2006-10-02 Thread Daniël Mantione
Op Mon, 2 Oct 2006, schreef ik: Now we have open array, that's a really cool thing, but I can't understand why I can't have a feature such as the compiler voodoo magic of the write procedure. Syntactically you cannot. However, the array of const is just as powerfull

Re: [fpc-devel] va(r)_arg vs open array

2006-10-02 Thread Marco van de Voort
On 10/2/06, Dani?l Mantione [EMAIL PROTECTED] wrote: Syntactically you cannot. However, the array of const is just as powerfull (actually more powerfull, since you can pass multiple arrays). We consider adding a trick to make it syntactically behave like writeln unnecessary. But in

Re: [fpc-devel] va(r)_arg vs open array

2006-10-02 Thread ik
On 10/2/06, Marco van de Voort [EMAIL PROTECTED] wrote: On 10/2/06, Dani?l Mantione [EMAIL PROTECTED] wrote: Syntactically you cannot. However, the array of const is just as powerfull (actually more powerfull, since you can pass multiple arrays). We consider adding a trick to make it

Re: [fpc-devel] va(r)_arg vs open array

2006-10-02 Thread Daniël Mantione
Op Mon, 2 Oct 2006, schreef ik: 2. The usage of []. Same. Penalty for being safe. It is also required being able to mix non array of const and normal parameters. What is the difference ? I mean, what is the difference between fnc(a,b,c,d,e,f,g,h,i,j); and fnc(a,[bcdefghij]); ?

Re: [fpc-devel] va(r)_arg vs open array

2006-10-02 Thread ik
On 10/2/06, Daniël Mantione [EMAIL PROTECTED] wrote: Op Mon, 2 Oct 2006, schreef ik: 2. The usage of []. Same. Penalty for being safe. It is also required being able to mix non array of const and normal parameters. What is the difference ? I mean, what is the difference between

Re: [fpc-devel] va(r)_arg vs open array

2006-10-02 Thread Marco van de Voort
On 10/2/06, Marco van de Voort [EMAIL PROTECTED] wrote: 1. It's not a va_args. So? Other language, other syntax. We don't use {} either. Sure you do, {$include file.inc} {$H+} {Comment} We just don't use it as the C syntax wishes ... I hope it was obvious that I meant blocks. 2.

Re: [fpc-devel] va(r)_arg vs open array

2006-10-02 Thread ik
On 10/2/06, Marco van de Voort [EMAIL PROTECTED] wrote: On 10/2/06, Marco van de Voort [EMAIL PROTECTED] wrote: 1. It's not a va_args. So? Other language, other syntax. We don't use {} either. Sure you do, {$include file.inc} {$H+} {Comment} We just don't use it as the C syntax wishes

Re: [fpc-devel] va(r)_arg vs open array

2006-10-02 Thread Daniël Mantione
Op Mon, 2 Oct 2006, schreef ik: Well, I think that this is also a functional thing. * Syntactically, both methods can be safe. * Syntactically, the FPC/Delphi one is more powerfull. Well take a look at the way Java implement it: function varrags(String ... a) {