- Notifications
You must be signed in to change notification settings - Fork 69
Labels
bugSomething isn't workingSomething isn't workingcompatibility-oscatsyntax or semantics which are not necessarily part of the standard, but seen in the oscat-librariessyntax or semantics which are not necessarily part of the standard, but seen in the oscat-libraries
Milestone
Description
Describe the bug
Pointers can now be assigned to and from numbers, but additions on these pointers still fail
To Reproduce
The following function from oscat still fails with the issue :
Error: Invalid types, cannot generate binary expression for "__BIN_TO_BYTE_pt" and "DINT"
FUNCTION BIN_TO_BYTE : BYTE VAR_INPUT BIN : STRING[12]; END_VAR VAR pt : REF_TO BYTE; i: INT; X: BYTE; stop: INT; END_VAR (* version 1.226. jul 2009 programmer hugo tested by oscat BINARY_TO_byte converts a binary string into a byte. *) (* @END_DECLARATION := '0' *) pt := &(bin); stop := LEN(bin); FOR I := 1 TO stop DO x := pt^; (* calculate the value of the digit *) IF X = 48 THEN BIN_TO_BYTE := SHL(BIN_TO_BYTE,1); ELSIF X = 49 THEN BIN_TO_BYTE := SHL(BIN_TO_BYTE,1) OR 1; END_IF; pt := pt + 1; END_FOR; Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcompatibility-oscatsyntax or semantics which are not necessarily part of the standard, but seen in the oscat-librariessyntax or semantics which are not necessarily part of the standard, but seen in the oscat-libraries