crap, the only reason my pw is showing up is because i'm echoing it in my function. how do i get the function to return the variable $pw if my current method is not working???

Code:
function genWinCompliantPassword($length) 
$PassLength = $length
$RandomNumSeed = SRnd(@MSECS)

While $x <= $PassLength
$num = Rnd(93) + 33
$newNum = CHR($num)
$pw = $pw+$newNum
; if $x = $PassLength
; ? $pw
; endif
$x = $x + 1
Loop

Return $pw
EndFunction