Welcome Guest Search | Active Topics | Log In | Register

Idea: range data type
#1 Posted : Tuesday, September 11, 2018 7:16:39 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 3/26/2015(UTC)
Posts: 50
Location: Georgia

Thanks: 3 times
Was thanked: 0 time(s) in 0 post(s)
I was thinking, what if there was a data type that was a pair of numbers that would return true if compared to anything equal to or between those numbers. Something like this:

if(x == $4,16$)...

I'm sure there's a better delimiter thT could be used. The reason I think this would be useful, despite being able to do
(x >= 4 && x <= 16)
, aside from serving as a shorthand for that, is being able to use it in switch statements where you'd want the same thing to happen for a certain range of numbers.

What do you guys think of a feature like this?
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Clean Slate theme by Jaben Cargman (Tiny Gecko)
Powered by YAF 1.9.4 | YAF © 2003-2010, Yet Another Forum.NET
This page was generated in 0.089 seconds.