I’m having trouble with this variable declaration:
Code_Length at 0 range 18..20;
I’m familiar with constraints, but the at 0 is what’s giving me fits, and I can’t find any working examples online anywhere else.
If I had to guess (and I’m totally guessing), the at 0 initializes the value to 0, then the constraint is enforced on any subsequent assignment operation. But I can’t find anything to verify that.
That’s not a variable declaration, that’s a representation clause for a field of a record. Whatever record declaration you excerpted that from has a field named “Code_Length”. And this representation clause indicates that the storage for it (3 bits) will be offset 0 bytes from the start of whole record’s storage, and occupy bits 18 through 20.
Providing more contextual code would help the explanation.