Does Euphoria have a null statement?
All,
Does Euphoria have a null statement? That is a statement which just does
nothing but is occasionally useful as a place holder during program
development?
As an example in C I might write something like:
if (mode == MODE_TEXT)
;
else if (mode == MODE_HTML)
process_html();
else
invalid_mode(mode);
The ; on it's own is C's null statement (well the ; is actually a statement
terminator and there is no statement but lets not get bogged down in this
stuff
Later while writing the code I might get round to updating it to:
if (mode == MODE_TEXT)
process_text;
else if (mode == MODE_HTML)
process_html();
else
invalid_mode(mode);
In Euphoria I could write a procdure called donothing as follows:
procedure donothing()
end procedure
and then convert the above C code to the following Euphoria code:
if MODE = MODE_TEXT
donothing()
elsif MODE = MODE_HTML
process_html()
else
invalid_mode(mode)
end if
but this seems a little "odd". Is there something I could use instead of the:
donothing()
I wonder - any ideas?
Regards,
FP.
Create a new mailbox, or access your existing IMAP4 or
POP3 mailbox from anywhere with just a web browser.
|
Not Categorized, Please Help
|
|