EDIT: Title should be 'Is :Float *an* object'
Actually, are any of the built-in types objects (other than String and arrays, which we know are objects).
Syntactically, they seem to be objects since they are declared with the ':' operator like any other object. But I'm wondering what happens under the hood when you, for example, multiply two objects together.
For example, if :Int is an object, how does the compiler handle something like this:
..how are the objects multiplied together?
The reason I ask, is because I'm wondering if it would be possible to create some other low level variable (such as a float variable that acts differently from the built-in one). An exact float representation variable, such as PowerBasic's 'Currency' variable is an example (which uses Binary Coded Decimal - 80 bits - internally to represent floating point variables). The advantage to this variable type is that there is virtually no data loss. For example, 3.2 will be represented internally as 3.2, not 3.200000345 or whatever.
Any ideas?
Thanks,
Russell
Actually, are any of the built-in types objects (other than String and arrays, which we know are objects).
Syntactically, they seem to be objects since they are declared with the ':' operator like any other object. But I'm wondering what happens under the hood when you, for example, multiply two objects together.
For example, if :Int is an object, how does the compiler handle something like this:
Local a:Int, b:Int = 3, c:Int = 2 a = b * c
..how are the objects multiplied together?
The reason I ask, is because I'm wondering if it would be possible to create some other low level variable (such as a float variable that acts differently from the built-in one). An exact float representation variable, such as PowerBasic's 'Currency' variable is an example (which uses Binary Coded Decimal - 80 bits - internally to represent floating point variables). The advantage to this variable type is that there is virtually no data loss. For example, 3.2 will be represented internally as 3.2, not 3.200000345 or whatever.
Any ideas?
Thanks,
Russell