Rob Kennedy schrieb:
Write that into your local coding guidelines and
enforce it in code reviews, not the language spec.
This argument can be used to promote each and every change, no matter how
obscure it is.
But you forget that you may be forced to read code from other people in which case
On Tue, 19 Oct 2010 21:18:03 +0100
Vannus van...@gmail.com wrote:
your example is at the start of a for loop block, which is much the same
as having it at the start of a procedure block
So much the same that you can do it in pascal?
What about variables declared inside this for loop or inside
Am 18.10.2010 20:21, schrieb Vannus:
On 18 October 2010 15:33, Sven Barth pascaldra...@googlemail.com
mailto:pascaldra...@googlemail.com wrote:
Am 18.10.2010 16:20, schrieb Michael Van Canneyt:
Object Pascal is a simple, beautiful and easy to read language.
The FPC
On 19 October 2010 15:06, Rob Kennedy
kennedyri+fpc-pas...@gmail.comkennedyri%2bfpc-pas...@gmail.com
wrote:
On Tue, Oct 19, 2010 at 12:23 AM, Jürgen Hestermann
juergen.hesterm...@gmx.de wrote:
Reimar Grabowski schrieb:
for (int i = 0;...)
Can't see anything wrong. I use declaration of
On Thu, Oct 14, 2010 at 11:21 AM, Michael Van Canneyt
mich...@freepascal.org wrote:
On Thu, 14 Oct 2010, Frank Church wrote:
Can variables be declared within a begin end block?
No.
That found in Gnu Pascal
Can we ask to be feature request?
Thanks
--
Zaher Dirkey
On 18 October 2010 07:49, Florian Klaempfl flor...@freepascal.org wrote:
Am 18.10.2010 08:17, schrieb Zaher Dirkey:
On Thu, Oct 14, 2010 at 11:21 AM, Michael Van Canneyt
mich...@freepascal.org mailto:mich...@freepascal.org wrote:
On Thu, 14 Oct 2010, Frank Church wrote:
Am 18.10.2010 14:58, schrieb Frank Church:
On 18 October 2010 07:49, Florian Klaempfl flor...@freepascal.org
mailto:flor...@freepascal.org wrote:
Am 18.10.2010 08:17, schrieb Zaher Dirkey:
On Thu, Oct 14, 2010 at 11:21 AM, Michael Van Canneyt
On 18 October 2010 14:42, Florian Klaempfl flor...@freepascal.org wrote:
Am 18.10.2010 14:58, schrieb Frank Church:
On 18 October 2010 07:49, Florian Klaempfl flor...@freepascal.org
mailto:flor...@freepascal.org wrote:
Am 18.10.2010 08:17, schrieb Zaher Dirkey:
On 18 October 2010 14:55, Frank Church vfcli...@gmail.com wrote:
On 18 October 2010 14:42, Florian Klaempfl flor...@freepascal.org wrote:
Am 18.10.2010 14:58, schrieb Frank Church:
On 18 October 2010 07:49, Florian Klaempfl flor...@freepascal.org
mailto:flor...@freepascal.org wrote:
On 18.10.2010 15:55, Frank Church wrote:
I just want to create shorter variables like
si := StringList.NameOfIndex(TableName.FieldByName('').AsString);
ae := xxx;
so:= yyy
to express complicated logic with them.
Maybe the usage of WITH could be helpful in some of these cases
Bernd
On 18.10.2010 15:55, Frank Church wrote:
I understand the need to avoid stuff that could create unintended errors
It would create something that I would call irregularity (or even
ugliness) in the language grammar. Nowhere else is it ever allowed to
have certain things inside a begin/end block,
On Mon, 18 Oct 2010, Bernd Kreuss wrote:
On 18.10.2010 15:55, Frank Church wrote:
I understand the need to avoid stuff that could create unintended errors
It would create something that I would call irregularity (or even
ugliness) in the language grammar. Nowhere else is it ever allowed
I just want to create shorter variables like
si := StringList.NameOfIndex(TableName.FieldByName('').AsString);
ae := xxx;
so:= yyy
to express complicated logic with them.
When I put them all at the top of the procedure, they are extra
noise, which is
Am 18.10.2010 16:20, schrieb Michael Van Canneyt:
Object Pascal is a simple, beautiful and easy to read language. The FPC
team tries to keep it that way.
And that is why I like the FPC team so much. :D
Regards,
Sven
___
fpc-pascal maillist -
On Mon, 18 Oct 2010 15:42:31 +0200, Florian Klaempfl wrote about Re:
[fpc-pascal] Can variables be declared within a block?:
[snip]
It's just a matter of readability, e.g. having a variable declared in
two blocks with the same name can cause you a lot of headache:
procedure p;
begin
On 18 October 2010 15:33, Sven Barth pascaldra...@googlemail.com wrote:
Am 18.10.2010 16:20, schrieb Michael Van Canneyt:
Object Pascal is a simple, beautiful and easy to read language. The FPC
team tries to keep it that way.
And that is why I like the FPC team so much. :D
agreed.
When
On Mon, 18 Oct 2010 19:21:57 +0100
Vannus van...@gmail.com wrote:
Since then, i would say If you need vars throughout your code, then
something is wrong with your code
for (int i = 0;...)
Can't see anything wrong. I use declaration of variables inside blocks quite
often in Java and C++ but
for (int i = 0;...)
Can't see anything wrong. I use declaration of variables inside blocks quite
often in Java and C++ but have never missed it in pascal. Please enlighten me.
What is so bad about creating temporary variables inside blocks instead of the
beginning of a function in a language
On Mon, 18 Oct 2010 19:46:04 -0200, Andreas Berger wrote about Re:
[fpc-pascal] Can variables be declared within a block?:
for (int i = 0;...)
Can't see anything wrong. I use declaration of variables inside
blocks quite often in Java and C++ but have never missed it in
pascal. Please
But it should make you wonder why this is no longer allowed in the
latest C++ standards.
What do you mean?
The current C++ standard (ISO 1998+TR1) permits short scope
declarations. Indeed, C++ permits declarations to appear anywhere, not
just after a { to open a function or compound
On Oct 18, 2010, at 6:42 AM, Florian Klaempfl wrote:
Am 18.10.2010 14:58, schrieb Frank Church:
It's just a matter of readability, e.g. having a variable declared in
two blocks with the same name can cause you a lot of headache:
So don't allow identical names.
Ada allows exactly this
Reimar Grabowski schrieb:
for (int i = 0;...)
Can't see anything wrong. I use declaration of variables inside blocks quite often in Java and C++
but have never missed it in pascal. Please enlighten me. What is so bad about creating temporary variables
inside blocks instead of the beginning of
Can variables be declared within a begin end block?
eg.
if y = xxx then
begin
var xxx;
var yyy;
end
There are there as shortnames for long expressions
--
Frank Church
===
http://devblog.brahmancreations.com
___
fpc-pascal
On Thu, 14 Oct 2010, Frank Church wrote:
Can variables be declared within a begin end block?
No.
Michael.
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
24 matches
Mail list logo