Should size be extended to variables?
richmondmathewson at gmail.com
Sat Aug 20 13:50:36 EDT 2016
That seems a good idea.
How about a term 'bytes' as in:
put the bytes of MyVar ?
Ah: 'bytes' is already used . . . !!!!
I just tried this:
put "I'm a little teapot short and stout" into VVAR
put the number of bytes in VVAR into fld "BITES"
put the number of chars in VVAR into fld "CHARZ"
and found the number of bytes was the same as the number of chars,
presumably using double-byte
stuff such as Chinese the latter would be twice the former.
On 20.08.2016 19:58, Richard Gaskin wrote:
> Currently the length function returns the number of characters in the
> data passed to it, but there may be times when what we want to know is
> the actual size of the data in bytes, which may vary from the number
> of characters.
> The size function seems a good fit for this, since it's all about bytes.
> Should I submit an enhancement request to extend the size function to
> work with variables as it does for objects?
> Any other options I should consider before submitting a request for
> some means of determining data length in bytes?
More information about the Use-livecode