Re: New switch/case idea

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

This is simple, easily read, plain, works great:

switch sendheader[idx][1] do 
   case "GET": tempheader &= sendheader[idx][1] & sendheader[idx][2] & sendheader[idx][3] & " " & httpversion & "\r\n" break -- append the http version and flatten 
   case "POST":  tempheader &= sendheader[idx][1] & sendheader[idx][2] & sendheader[idx][3] & " " & httpversion & "\r\n" break -- append the http version and flatten 
   case else tempheader &= sendheader[idx][1] & sendheader[idx][2] & sendheader[idx][3] & "\r\n" -- else just flatten the sequence 
end switch 
 

Switch doesn't need anything else except range, or executeable case. It doesn't need "with/out fallthru", "then", "do", "continue", etc.

useless

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

Search



Quick Links

User menu

Not signed in.

Misc Menu