MsgInfoEx

HMG Samples and Enhancements

Moderator: Rathinagiri

User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: MsgInfoEx

Post by Rathinagiri »

Very nice image Claudio. :)
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: MsgInfoEx

Post by esgici »

Don't miss MyAlert() function of our friend Pablo Cesar.

It'is into STRU application.

Last version is here :

viewtopic.php?f=8&t=2443&start=140#p22142

Happy HMG'in :D
Viva INTERNATIONAL HMG :D
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: MsgInfoEx

Post by srvet_claudio »

esgici wrote:Don't miss MyAlert() function of our friend Pablo Cesar.
Thanks brother Esgici, I will see.
Regards,
Claudio.
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: MsgInfoEx

Post by Rathinagiri »

Hi Claudio,

For your kind information, I have changed the order of parameters like this.

FUNCTION MsgInfoEx (xMsg, cTitle, cSeparator, bInfoDebug)

This way we can omit the extra , and it is very easy to find and replace all msginfo to msginfoex in my source code. ;)
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
Amarante
Posts: 182
Joined: Fri Apr 27, 2012 9:44 pm
DBs Used: DBF, MySQL, MariaDB, SQLite, PostgreSQL
Location: Araruama-RJ, Brazil

Re: MsgInfoEx

Post by Amarante »

translation via google:
I found this article here on the subject.
Frankly I could not see a significant difference and personally I like the "IF" structure in place of "CASE".
I think it is more a matter of taste since no significant change at runtime, but please me know if I'm wrong.
Regards,
Amarante
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: MsgInfoEx

Post by Rathinagiri »

IMHO, it is the difference between locate and seek.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: MsgInfoEx

Post by srvet_claudio »

Rathinagiri wrote:Hi Claudio,

For your kind information, I have changed the order of parameters like this.

FUNCTION MsgInfoEx (xMsg, cTitle, cSeparator, bInfoDebug)

This way we can omit the extra , and it is very easy to find and replace all msginfo to msginfoex in my source code. ;)
Very nice!
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

MsgInfoEx

Post by Pablo César »

Amarante wrote:Frankly I could not see a significant difference and personally I like the "IF" structure in place of "CASE".
I think it is more a matter of taste since no significant change at runtime, but please me know if I'm wrong.
Hi Amarante,

I also agree in parts with you. I have read this:
Is “elseif” faster than “switch() case” ?

Why do you care?

99.99% of the time, you shouldn't care.

These sorts of micro-optimizations are unlikely to affect the performance of your code.

Also, if you NEEDED to care, then you should be doing performance profiling on your code. In which case finding out the performance difference between a switch case and an if-else block would be trivial
I agree with just for the appearance which Do Case seems more clear IMHO, that is important. Micro-seconds of performance is not going to affect your system anyway. The important is the code to be more clear as posible for now and for the future interpretation, being by me or others.

Also I believe when many IFs are defined, many duplicated conditions could be attended at same time. So, IMHO Do Case I use when I just want only one choice.

This is my point-of-view. I hope to be helpfully to form a good own review.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: MsgInfoEx

Post by srvet_claudio »

From the point of view of logic of programming ELSEIF is identically to DOCASE, because both are for mutually exclusive clauses.

This code is equivalent:

Code: Select all

CASE a == b   -->   IF a == b
CASE a == c   -->   ELSEIF a == c
CASE a == d   -->   ELSEIF a == d
OTHERWISE     -->   ELSE
If exist any difference in efficiency is due to the way the compiler implements these commands in Harbour, but not is due to the logic of evaluation.
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
Amarante
Posts: 182
Joined: Fri Apr 27, 2012 9:44 pm
DBs Used: DBF, MySQL, MariaDB, SQLite, PostgreSQL
Location: Araruama-RJ, Brazil

Re: MsgInfoEx

Post by Amarante »

Thanks for your answers. Of course I know that the "Case", depending on the compiler is faster than "if". But what I wanted to express is that in the example of the difference would be negligible Claudio and pleases me more, in most cases, the IF ... ELSEIF style to see the logic. But as I said ... it's just my humble opinion.
Post Reply