Re: New switch/case idea

new topic     » goto parent     » topic index » view thread      » older message » newer message
kinz said...

I'd like to be a bit more specific, sorry:

switch X on  -- this 'on' is a specific sensible and intelligent 
   case a ?1 -- marker, it is clear constuct for translation 
   case b ?2 -- to Russian and using it in pure Russian, pure 
   else   ?3 -- English or any mixed English-Russian mode. 
end switch   -- It is good known word from BASIC. 

Russian version, for example, not final:

vetvv X na   -- means branch X on 
   putt a ?1 -- means way 
   putt b ?2 -- means way 
   inache ?3 -- means else 
stop vetvv   -- means end branch 

Do you ask me about such a thing? I like it, if so.

I like your example. If I understand your idea correctly, then I give my full support to it. I think the final english syntax should be something like this:

switch X on 
   case a then 
	?1 
   case b,c,d then -- since we have multiple cases here, the 'then' is necessary 
   	?2 
   case else 
  	?3 
end switch 
kinz said...

But do you use this 'on' somewhere else?
If it means direction of some other switching or such, it will be good idea too.

Regards,
Igor Kachan
kinz@peterlink.ru

'on' would be a new keyword, so for now it would not be used anywhere else. Once 4.0 beta is released (at most 1 or 2 weeks from now), the earliest a new usage of 'on' could be introduced would be for EU 4.1

However, in english 'on' has a meaning of on/off that is similar to with/without or have/not have, as well as a meaning of allow/not allow. I think 'on' has more meanings in english than 'do' does.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu