Hi Paul.
With ibasic we could use len(string) to return the size of string but i get a compile error when i use it in Aurora. We could use sizeof() as an alternative maybe ;)
Lewis
I don't think IBasic allowed those, but I always wished they were. And LEN seems like a BASIC function, although for the length of strings it's great. sizeof() would be my preference for UDT size, and also built in, for example on 32 bit, sizeof(pointer) == 32, but 64 on a 64 bit computer.
Quote from: Lewis on January 12, 2006, 05:41:05 PM
Hi Paul.
With ibasic we could use len(string) to return the size of string but i get a compile error when i use it in Aurora. We could use sizeof() as an alternative maybe ;)
Lewis
I don't get an error. This works for string hex:
for (i=0; i<len(hex); i++)
{
value = value +
(instr("0123456789ABCDEF",mid$(hex,len(hex)-i,1))-1)*power(16,i);
}
But he means literally, len(string), which should return 255, or the length of the string type. To avoid confusion is why I said sizeof() would be a good alternative.
Ok, that makes more sense.