Help! Undeclared Variable

I am writing my first mel with 2 proc

CODE
global proc A
{
float $abc = 1;
}

global proc B
{
float $def = abc;
}

so I got abc is undeclared variable
--
I could not understand why
Could anyone help me

something called scope do a search for it in the docs...

The variable $abc ONLY exists inside proc A (and ONLY inside the { } it is defined between), so when you reference it inside proc B, proc B has no idea what it is. (i'll assume all your other syntax errors are just cos it's pseudo code! )

if you DID want this to work exactly as is, you'd have to declare $abc as a GLOBAL float.. but global vars are not really advised...

:nathaN