RAM relevance for RAM MB and GB

(imported topic written by SystemAdmin)

Hi Everyone,

any idea about relevance for ram that if size of ram is greater than 1024 mb it will be in gb format else mb format.

ex.

if size of ram > 1024 mb then size of ram in GB else size of ram in MB

tthanks in advance,

braian

(imported comment written by SystemAdmin)

Give this a try…

if (size of ram /1024/1024) > 1024 then (size of ram /1024/1024/1024 as floating point) as string & "gb" else (size of ram /1024/1024 as floating point) as string & "mb"

(imported comment written by SystemAdmin)

Here is another example that may be useful. Referring to everything in GB but converting it to floating point. For instance 512MB would be .5GB.

http://www.ibm.com/developerworks/forums/thread.jspa?threadID=468100