#81730 - 2003-07-1204:48 AMRe: MemorySize Function
RadimusRadimus Moderator
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
code:
for each $dimm in WMIQuery("Capacity","Win32_PhysicalMemory") $mem[$a]=val($dimm) / 1048576 $memory=val($memory)+val($mem[$a]) $a=val($a)+1 next $dimm1=$mem[0] $dimm2=$mem[1] $dimm3=$mem[2]
[ 12. July 2003, 04:48: Message edited by: Radimus ]
#81732 - 2003-07-1201:12 PMRe: MemorySize Function
RadimusRadimus Moderator
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
sorry...
code:
break on
$a=0 $mem=WMIQuery("Capacity","Win32_PhysicalMemory") for each $dimm in $mem $mem[$a]=val($dimm) / 1048576 $memory=$memory + $mem[$a] $a=$a + 1 next ? $memory for each $stick in $mem ? $stick next
#81733 - 2003-07-1209:53 PMRe: MemorySize Function
NTDOCNTDOC Administrator
Registered: 2000-07-28
Posts: 11620
Loc: CA
Thanks Rad,
Here is a minor modification for a better look on the console.
break on
$a=0
$Index=0
$mem=WMIQuery("Capacity","Win32_PhysicalMemory")
for each $dimm in $mem
$mem[$a]=val($dimm) / 1048576
$memory=$memory + $mem[$a]
$a=$a + 1
next
for each $stick in $mem
? 'Memory Slot '+$Index +': '+$stick
$Index=$Index+1
next
? 'Total Memory : '+$memory
[ 12. July 2003, 21:55: Message edited by: NTDOC ]
I have to agree with Jooel on this one. It can definitley be classified as a bug due to the fact that an INT is being returned instead of a DBL. Thus, the MEMORYSIZE() function needs to be updated to either return a DBL or integer values will be declared a LONG INT by default instead of an INT.
_________________________
There are two types of vessels, submarines and targets.
hmm... we had that int versus long int discussion before. there actually is no more int in kix. no matter how you try, you can't make integer values.
anyway, not sure can I call it a bug, but it damn sure is a limitation. it's like trying to run your domain with win95 as clients. the upper boundary limit has been reached and that makes the need to enchange kixtart so it will not be outdated.