[Gambas-user] Example script on Gambaswiki fails (GetUsedMemory) - needs Clong
Gianluigi
bagonergi at gmail.com
Wed Feb 5 16:44:12 CET 2020
Il giorno mer 5 feb 2020 alle ore 12:51 Peter Bauer <pebauer68 at gmail.com>
ha scritto:
> Hello,
> http://gambaswiki.org/wiki/doc/whatisgambas?nh
> http://gambaswiki.org/wiki/doc/whatisgambas?nh#t4
> Gambas 3.14 output:
> MMain.GetUsedMemory.14: #6: Type mismatch: wanted Integer, got String
> instead MMain.GetUsedMemory.14 MMain.Main.23
>
> While I do not fully understand the Type mismatch (got String !?, really
> ?).
> -When I replace Cint(aRes[1] with CLong(aRes[1]) it works again.
>
It fails on VmallocTotal that for example in my computer is 34359738367 kB,
higher than the limit of an integer variable.
String has nothing to do with it and Clong() instead of CInt() works well.
It would also works with Val().
Regards
Gianluigi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20200205/c357668c/attachment.html>
More information about the User
mailing list