Re: Does Euphoria have a null statement?

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

FP,

Your C code:
 if (mode == MODE_TEXT)
      ;
else if (mode == MODE_HTML)
      process_html();
else
      invalid_mode(mode);

becomes the following Euphoria code:



The absence of a stetement between then and else, elsif, or endif is
perfectly legal--I leave the blank space to remind me to put somthing there,
I could also insert a comment as follows:

if mode=MODE_TEXT then
    --process_text()
elsif mode=MODE_HTML then
    process_html()
else
    invalid mode(mode)
end if

using the intended name for my routine--then when it is written, I merely
have to remove the comment indicator (--).

-- Mike Nelson

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

Search



Quick Links

User menu

Not signed in.

Misc Menu