[flexcoders] Re: const?

2007-12-21 Thread Cosma
--- In flexcoders@yahoogroups.com, Gordon Smith [EMAIL PROTECTED] wrote: If I need something like pi as a const I would declare a class member const for pi, not a function scoped const var. If you needed to use this constant in only one method, declaring it as a class member would be a

[flexcoders] Re: const?

2007-12-20 Thread johantrax
I think you still pretty much get the concept of const. It means the value of yyy cannot be changed after initialisation. To actually see it used in methods like this.. I assume the example you gave is a bit 'stripped down' :p If I get it correctly, everything is ActionScript is passed by

[flexcoders] Re: const?

2007-12-20 Thread reflexactions
Actually I wouldnt mind betting that code of yours would run without any error at all, native types are passed by value not reference. --- In flexcoders@yahoogroups.com, johantrax [EMAIL PROTECTED] wrote: I think you still pretty much get the concept of const. It means the value of yyy

[flexcoders] Re: const?

2007-12-20 Thread johantrax
Then it's out of my league, perhaps someone from Adobe could help us out? (subtile hint ;) --- In flexcoders@yahoogroups.com, reflexactions [EMAIL PROTECTED] wrote: Actually I wouldnt mind betting that code of yours would run without any error at all, native types are passed by value not

Re: [flexcoders] Re: const?

2007-12-20 Thread Paul Andrews
to that constant only as part of the declaration or inside the class constructor. Paul - Original Message - From: johantrax [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Thursday, December 20, 2007 12:14 PM Subject: [flexcoders] Re: const? Then it's out of my league

[flexcoders] Re: const?

2007-12-20 Thread reflexactions
can assign a value to that constant only as part of the declaration or inside the class constructor. Paul - Original Message - From: johantrax [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Thursday, December 20, 2007 12:14 PM Subject: [flexcoders] Re: const

Re: [flexcoders] Re: const?

2007-12-20 Thread Paul Andrews
- Original Message - From: reflexactions [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Thursday, December 20, 2007 1:41 PM Subject: [flexcoders] Re: const? Thanks for the advice, Maybe you could read the question, I am talking about Adobe declaring a const inside a function

[flexcoders] Re: const?

2007-12-20 Thread reflexactions
.. --- In flexcoders@yahoogroups.com, Paul Andrews [EMAIL PROTECTED] wrote: - Original Message - From: reflexactions [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Thursday, December 20, 2007 1:41 PM Subject: [flexcoders] Re: const? Thanks for the advice, Maybe you could

[flexcoders] Re: const?

2007-12-20 Thread johantrax
unless you have a split personality. Well... it might be you just provided the answer there. When working on a project having the size of Flex, you work in a team. Most probably a short function is indeed written by one person. But what guarantees that nobody else will one day pass by and alter

Re: [flexcoders] Re: const?

2007-12-20 Thread Paul Andrews
- Original Message - From: reflexactions [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Thursday, December 20, 2007 2:51 PM Subject: [flexcoders] Re: const? const are usually declared const becuase they are public or protected and accesible by other user or subclass and you

[flexcoders] Re: const?

2007-12-20 Thread reflexactions
I work in a team and have so done for the last 20+ years and never yet declared a variable with function level scope as const just to prevent some other person coming along later and changing the code value of the variable if they think it is needed. ...and if thats was the case why dont we

[flexcoders] Re: const?

2007-12-20 Thread reflexactions
be declared as a const --- In flexcoders@yahoogroups.com, Paul Andrews [EMAIL PROTECTED] wrote: - Original Message - From: reflexactions [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Thursday, December 20, 2007 2:51 PM Subject: [flexcoders] Re: const? const are usually

Re: [flexcoders] Re: const?

2007-12-20 Thread Paul Andrews
- Original Message - From: reflexactions [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Thursday, December 20, 2007 3:21 PM Subject: [flexcoders] Re: const? I work in a team and have so done for the last 20+ years and never yet declared a variable with function level scope

Re: [flexcoders] Re: const?

2007-12-20 Thread Paul Andrews
- Original Message - From: reflexactions [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Thursday, December 20, 2007 3:35 PM Subject: [flexcoders] Re: const? So your telling me that when you write a function if you have a var that wont change its value for the duration

[flexcoders] Re: const?

2007-12-20 Thread reflexactions
to code. --- In flexcoders@yahoogroups.com, Paul Andrews [EMAIL PROTECTED] wrote: - Original Message - From: reflexactions [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Thursday, December 20, 2007 3:21 PM Subject: [flexcoders] Re: const? I work in a team and have so

Re: [flexcoders] Re: const?

2007-12-20 Thread Ralf Bokelberg
: [flexcoders] Re: const? So your telling me that when you write a function if you have a var that wont change its value for the duration of that function say like: override protected function updateDisplayList(...):void{ var count:int=numChildren; ..loop code.. ...finished } I only

Re: [flexcoders] Re: const?

2007-12-20 Thread Paul Andrews
- Original Message - From: reflexactions [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Thursday, December 20, 2007 4:13 PM Subject: [flexcoders] Re: const? 20+ years? LOL, I have the drop on you.. Depends on how big the + is doesnt it lol... Now if were gonna do a how long

Re: [flexcoders] Re: const?

2007-12-20 Thread Ralf Bokelberg
Talking about ancient times - In Pascal you were able to declare local member variables. I always found it useful, if you need the var in one place only. Cheers Ralf.

RE: [flexcoders] Re: const?

2007-12-20 Thread Gordon Smith
: [flexcoders] Re: const? I work in a team and have so done for the last 20+ years and never yet declared a variable with function level scope as const just to prevent some other person coming along later and changing the code value of the variable if they think it is needed. ...and if thats

Re: [flexcoders] Re: const?

2007-12-20 Thread Vadim Melnik
is the root of all evil. -- Thanks, Vadim. - Original Message - From: Ralf Bokelberg To: flexcoders@yahoogroups.com Sent: Thursday, December 20, 2007 6:18 PM Subject: Re: [flexcoders] Re: const? Ideally a const inside a function allows you to use an identifier for a constant value, which