Closed mahSource closed 12 months ago
Under this header https://odin-lang.org/docs/overview/#switch-statement A switch statement can also use ranges like a range-based loop:
switch c { case 'A'..'Z', 'a'..'z', '0'..'9': fmt.println("c is alphanumeric") }
Compiler warning: Syntax Warning: '..' for ranges has now been deprecated, prefer '..='
Suggested update resulting in no warnings:
switch c { case 'A' ..= 'Z', 'a' ..= 'z', '0' ..= '9': fmt.println("c is alphanumeric") }
Closed via 1a2cb94b6c4050b2fcc7955f770f09af425ea921.
Thank you!
Under this header https://odin-lang.org/docs/overview/#switch-statement A switch statement can also use ranges like a range-based loop:
Compiler warning: Syntax Warning: '..' for ranges has now been deprecated, prefer '..='
Suggested update resulting in no warnings: