Micky Hulse wrote:
Pedro Taranto wrote:
if you want to return diferent types in one function you dont specify
any return data type
Ah, sounds good to me. I was not sure if it was bad practice to not
specify a type.
Well, if you want to write strictly, and if you're interested in exactly
Hi Alan, thanks for reply.
Alan MacDougall wrote:
Well, if you want to write strictly, and if you're interested in exactly
what data type your method returns, you can specify a return type of
Object (the parent of every other AS class):
Ooooh, nice!
Thanks for the code snippet and tips!
eric e. dolecki wrote:
the compiler will point this out for you.
I see now. :)
Thanks Eric, you have been very helpful. I really appreciate it.
Have a great day/night.
Cheers,
Micky
--
Wishlists: http://snipurl.com/1gqpj
Switch: http://browsehappy.com/
BCC?: http://snipurl.com/w6f8
Pedro Taranto wrote:
if you want to return diferent types in one function you dont specify
any return data type
Ah, sounds good to me. I was not sure if it was bad practice to not
specify a type.
if you wanna use an auxiliary 'object' to use as a reference to another,
try to use the same
Void or void is used when the method doesn't return a value.
function foo ():String
{
return someString;
}
so that method returns a string :)
I have seen people use void within a method that takes no arguments, like
this (but I would never do it):
function foo( Void):Void
{
...
video
Hey Eric, thanks for the fast reply, I really appreciate the help.
eric e. dolecki wrote:
Void or void is used when the method doesn't return a value.
That make sense. :)
So, just to clarify further, if the function returns anything then
assign the function (is this called casting a
you don't have to type a return type - its mostly for legibility.
if you type an argument in a func and send something else, the compiler will
catch it..
function foo( nValue:Number )
{
// stuff
};
foo( aString );
the compiler will point this out for you.
On 7/27/07, Micky Hulse [EMAIL
if you want to return diferent types in one function you dont specify
any return data type
function foo () {...}
if you wanna use an auxiliary 'object' to use as a reference to another,
try to use the same data type
...
var auxVideo : Video = myVideo;
...
--
Pedro Taranto
8 matches
Mail list logo