----- Original Message ----- From: "tobias" <tobiasb...@web.de> To: "mailing list for gambas users" <gambas-user@lists.sourceforge.net> Sent: Thursday, 29 December, 2011 5:52:36 PM Subject: Re: [Gambas-user] Issue 176 in gambas: problems with SizeOf()
On 29.12.2011 18:41, tommyl...@eircom.net wrote: > > ----- Original Message ----- > From: gam...@googlecode.com > To: gambas-user@lists.sourceforge.net > Sent: Thursday, 29 December, 2011 5:32:14 PM > Subject: Re: [Gambas-user] Issue 176 in gambas: problems with SizeOf() > > > Comment #1 on issue 176 by benoit.m...@gmail.com: problems with SizeOf() > http://code.google.com/p/gambas/issues/detail?id=176 > > Have you read the documentation of SizeOf? > > Yes, it says that > > "Size = SizeOf ( Datatype ) - Returns the memory used for storing a specific > datatype." and "Datatype can be any of the listed. So I assume that I can do > with a as integer -> a=SizeOf(f as float) or a=SizeOf(s as string), and "a" > should return the length of the datatype in bytes. Or am I wrong? > > Regards > Tomek. > yes, you are. there are integer constants for those datatypes... so SizeOf(gb.Float) will return the desired value. the list lines up there? Thanks, I got it now, but in that case is there a way to check the size of the object or structure? I have to compare the size of two different objects that are function arguments. Tomek. ------------------------------------------------------------------------------ Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user