@PEB
Ah! Silly me, there was something odd but couldn't spot it. Guess it is bed time for me.
Thanks for the tip.
@Andreas
Shouldn't that throw some error or warning? Where are those values coming from? Seems always to be the width value from the several retries I did.
But when you weren't using the constants, ATTRWIDTH and ATTRHEIGHT were taken as variables that had not yet been assigned a value, so they were equal to zero (same as the constant #ATTRWIDTH).
But when you weren't using the constants, ATTRWIDTH and ATTRHEIGHT were taken as variables that had not yet been assigned a value, so they were equal to zero (same as the constant #ATTRWIDTH).
Yes, that is the theory and what I expected, but no matter what display size is opened, if I forget the "#" both undeclared "variables" get assigned the display's width value, not 0.
emeck wrote: ↑Sun Sep 19, 2021 9:24 am
Yes, that is the theory and what I expected, but no matter what display size is opened, if I forget the "#" both undeclared "variables" get assigned the display's width value, not 0.
No, they will be 0, the return value will be the display's width value because, as PEB has explained, 0 is the same as #ATTRWIDTH.