Format enum with custom values Forum Home › Forums › Understanding the Software › Format enum with custom values This topic has 2 replies, 2 voices, and was last updated 1 hour, 28 minutes ago by oley. Viewing 3 posts - 1 through 3 (of 3 total) Author Posts June 6, 2026 at 6:02 pm #17998 oleyParticipant I have a command to enable/disable switch. The values are 0 and 0xFF00. Format enums start with a value of 0. Is it possible to define an enum with different values, like in C#? public enum SwitchState { Off = 0, On = 0xFF00 } June 6, 2026 at 6:53 pm #17999 manjey73Participant public double exsamp() { if (Cmd==0) return 0; elseif (Cmd==1) return 65 280; else return double.NaN; } there is no On or OFF in Cmd, numeric values are there, even if you use enumerations. June 6, 2026 at 8:29 pm #18000 oleyParticipant Thanks, I thought about some script but want to ask if there is another option. Author Posts Viewing 3 posts - 1 through 3 (of 3 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In