PDA

View Full Version : semicolon after func


cobo
09-04-2003, 06:29 AM
hi there,
i got a question...

when i write functions i usally donīt end it with a semicolon just like:

my_mc.onEnterFrame = function() {
my code...
}

but i got book where it looks something like this

the_mc.onEnterFrame = function() {
the code...
};

without the ; the script wonīt work
so whatīs the difference

thanx cobo

fgf
09-04-2003, 06:41 AM
; has no real effect outside for statements.

I never code a ; after function blocks, I don't think it fits with the java stylie syntax, and have never had a function not work because of it.

Post a sample, I betting thats not the only difference

fgf