On Tuesday, October 24, 2017 at 10:47:10 PM UTC+2,
cfbso...@gmail.com wrote:
Risky? Type-safe languages were invented for this reason.
The issue here is overflow detection not type safety.
A type safe language helps the programmer to avoid unexpected results and unexpected behaviours related to memory and arithmetic problems.
I expect that a type safe language helps me to detect that 255 + 1 = 0 since this is an unexpected result. Then I change the code to protect the program from a problem like this or enlarge the type for that arithmetic operation because I need larger
values.
On Wednesday, October 25, 2017 at 10:05:52 AM UTC+2, August Karlstrom wrote:
So you claim that for an expression containing a BYTE variable the
result type is undefined?
From the report: "The type of the result is that operand's type which includes the other operand's type."
The type of the result is BYTE. OBC gives a wrong result because 256 is not of type BYTE (maybe it does calculation as INTEGER).
--
Diego Sardina
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)