[Gambas-user] Print SizeOf(t) 't is a string
nando
nando_f at ...951...
Thu Jul 30 03:21:09 CEST 2015
Benoit,
Perhaps you could provide an example. I find nothing for the correct syntax/use.
For example...
Private p As Pointer
Public Struct EmployeeStruct
FirstName as String
Age as integer
End Struct
Public AnEmployee as EmployeeStruct
AnEmployee = New EmployeeStruct
p = AnEmployee
Print p.Sizeof() 'run-time error
-N
---------- Original Message -----------
From: "nando" <nando_f at ...951...>
To: mailing list for gambas users <gambas-user at lists.sourceforge.net>
Sent: Wed, 29 Jul 2015 21:00:10 -0400
Subject: Re: [Gambas-user] Print SizeOf(t) 't is a string
> SWEET!
> Thank you Benoit.
>
> ---------- Original Message -----------
> From: Benoît Minisini <gambas at ...1...>
> To: nando_f at ...951..., mailing list for gambas users
> <gambas-user at lists.sourceforge.net>
> Sent: Wed, 29 Jul 2015 21:37:29 +0200
> Subject: Re: [Gambas-user] Print SizeOf(t) 't is a string
>
> > Le 29/07/2015 21:15, nando a écrit :
> > > Thanks guys,
> > > I was in 'C' mode and needed the size of a structure.
> > >
> > > Perhaps, Benoit, sizeof(a string, or a struct) can do exactly that?
> > > wishing out loud.
> > >
> > > Thanks!
> > > DOH!
> > > -Nando
> >
> > If you a pointer to the structure, just use Object.SizeOf() to know its
> > size in memory.
> >
> > Regards,
> >
> > --
> > Benoît Minisini
> >
> > ------------------------------------------------------------------------------
> > _______________________________________________
> > Gambas-user mailing list
> > Gambas-user at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
> ------- End of Original Message -------
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
------- End of Original Message -------
More information about the User
mailing list