Michael

Results 35 comments of Michael

I don't really see `x2 := TRUE` as a big issue, it'll just have the value 1. Your other example will also retain it's value, so no downcast is happening....

> `x1 := 20` just feels wrong to me tbh, I'd be in favour of at least emitting a info / warning here. This is basically the same idea as...

I have tried a similar example with clang: ```C #include #include int main() { bool x = 20; char y = x; char z = !x; printf("%d\n", x); // 1...

Adding a `println!("{in2}");` to `date_time_numeric_functions::MUL_LTIME__SINT` before `checked_mul_time_with_signed_int(in1, in2.into())` is called results in the correct value. When removing it again, the value reverts back to 11750400000000000. This seems to be reproducible,...

I've looked into this a bit and also tested the behaviour of our old system, CodeSys 3 and Rust. Neither allow 2s complement literals to be assigned to signed types...

I've just double checked the standard and noticed the `INT#...` syntax isn't really meant as a type-cast but rather a literal denominator. I guess I got this mixed up due...

That might be sensible. I've also tried the following example: ``` {external} FUNCTION printf : DINT VAR_INPUT {ref} format : STRING; END_VAR VAR_INPUT args : ...; END_VAR END_FUNCTION FUNCTION main...

I had a look in the standard about this (6.6.1.4 Call representation and rules), and as far as I can tell we do not need to support this. The standard...

Reopening this since I feel like we should wait for #1104 and futhermore ensure that 1. every validation that can be done before entering codegen is actually done before codegen...

I think the `RETURN` keyword would be a neat addition. If we implement it not as a strict alias to the `FOO := ...` variable assignment but rather as a...