How constant are Constants?

Are constants definitively constant or can they be manipulated during runtime?

I have a constant with the following info for embedding a video but would like to manipulate the width and height of the video to suit the device. Is it possible?


A constant is what its name implies, a variable type (kind of box which content once put in, cannot be changed, only viewed or used) which value will be constant and not change during the whole execution of the application.

A constant cannot be changed at runtime. Otherwise it would not be a constant.

Thanks for confirming Chris, I did think as much but I never say never. There will be some other way to get the desired result.

A computed property that only implements the GET() part of the Get() Set() pair, looks and feels like a constant
But a true constant is (I believe) substituted throughout the code for compiling, so it really is fixed.

A computed property with only the Get() implemented is READ-only, but you could amend the code in the GET() to return a different value based on prevailing conditions.
Not sure if it’s useful to you…