Tag Archives: data type

Casting Values

There is the situation when an operation takes multiple operands, and one (or more) of those operands are inappropriate for the operation. For example, suppose an integer add operation was passed an integer object and an open file object? There is generally no “add” semantic for an integer and a file.

Total incompatibility results in a run-time error, but sometimes values are compatible enough for the operation to proceed. How the system accomplishes that often involves casting one value into another.

Continue reading →

Advertisements

In Disarray

One of the things that’s kept me from completing BOOL is that I haven’t been able to make up my mind regarding arrays.

There are two basic directions: All data types can have the native ability to create single or array instances, or the Array type is a special data type that can make an array instance of any data type.

There is also the issue of what should be the array syntax. How are arrays declared, and how are array members referenced?

I think, after all this time, I have finally made up my mind.

Continue reading →