1. Reserved word Select

Is 'select' a reserved word? It should be, even if there is no intention of implementing a select statement until version 4.99

new topic     » topic index » view message » categorize

2. Re: Reserved word Select

ArthurCrump said...

Is 'select' a reserved word? It should be, even if there is no intention of implementing a select statement until version 4.99

Arthur,

We are currently debating, see New Switch Idea how we will work with switch and/or select. Right now everyone is leaning toward never implementing select, but making switch act like select but give it a modifier to allow fallthru or not. For instance:

switch 1 do 
    case 1: ? 1 
    case 2: ? 2 
end switch 
 
-- Output: 
-- 1 

Now, if you supply a with fallthru then fallthru is active:

switch 1 do 
    case 1: ? 1 
    case 2: ? 2 
    case 3: ? 3   break 
    case 4: ? 4 
end switch 
 
-- Output: 
-- 1 
-- 2 
-- 3 

Depending on the outcome of the discussion, we will or will not implement select for version 4.0. If we decide that select is the way to go, then we will implement it in 4.0, not a later version. If we decide against select, then we will not implement it in 4.0, 4.1 or 4.99, because switch will have select and switch functionality. It then leaves that keyword open for variable names or routine names.

Jeremy

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu