Re: I can't get this to output how I want



Hi Steven,

"Steven Platt" <me@xxxxxxxxxxx> schrieb im Newsbeitrag
news:eGSOBa0TFHA.3620@xxxxxxxxxxxxxxxxxxxxxxx
> What is wrong with this thing? Maybe I am too used to PHP.
>
> Const EXAMPLE_BYTES = 32210195968
> Const BYTES_IN_MEG = 1048576
> Const MEGS_IN_GIG = 1024
>
> WScript.Echo EXAMPLE_BYTES & " is " & bytesToGigs( EXAMPLE_BYTES ) & " in
> gigs"
>
> Function bytesToGigs( someNumber )
> WScript.Echo (someNumber / BYTES_IN_MEG) / MEGS_IN_GIG
> End Function
>

Your function does not return a value but displays a message itself; that's
why u get two message boxes.

Function bytesToGigs( someNumber )
bytesToGigs = someNumber / BYTES_IN_MEG / MEGS_IN_GIG
End Function


.


Loading