Re: Reference manual
- Posted by Robert Craig <rds at RapidEuphoria.com> Aug 14, 2001
- 423 views
rforno writes: <comments on wording of refman.doc> Thanks. I'll see if I can improve the wording. > Does turning off type check apply also > to predefined types? In such a case, > does it increase execution speed? Checks for "sequence" and "integer" are always maintained. Checks for "atom" won't be performed. This might save you a bit of time. User-defined type checks are turned off, but consider the following: type color(integer x) return x = RED or x = BLUE or x = GREEN end type there will still be a simple integer-check performed on variables of type color, but the code inside the type won't be performed. The same goes for sequence type. >Assume the following code: > > sequence x > atom a > x = {1, 2, 3} > a = 5 > x[2] = a > > How much space occupies x[2]? 4 bytes, enough for the integer 5. > And what if a = 5.0 instead? a pointer to a single copy of the 8-byte double, 5.0, will be stored in x[2]. i.e. x[2] and a will both point to 5.0 (plus a 4-byte reference count). Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com