![Smile :)](./images/smilies/icon_e_smile.gif)
MsgInfoEx
Moderator: Rathinagiri
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: MsgInfoEx
Very nice image Claudio. ![Smile :)](./images/smilies/icon_e_smile.gif)
![Smile :)](./images/smilies/icon_e_smile.gif)
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: MsgInfoEx
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![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
It'is into STRU application.
Last version is here :
viewtopic.php?f=8&t=2443&start=140#p22142
Happy HMG'in
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
Viva INTERNATIONAL HMG ![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
- srvet_claudio
- Posts: 2193
- Joined: Thu Feb 25, 2010 8:43 pm
- Location: Uruguay
- Contact:
Re: MsgInfoEx
Thanks brother Esgici, I will see.esgici wrote:Don't miss MyAlert() function of our friend Pablo Cesar.
Regards,
Claudio.
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: MsgInfoEx
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.![Wink ;)](./images/smilies/icon_e_wink.gif)
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.
![Wink ;)](./images/smilies/icon_e_wink.gif)
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
- Amarante
- Posts: 182
- Joined: Fri Apr 27, 2012 9:44 pm
- DBs Used: DBF, MySQL, MariaDB, SQLite, PostgreSQL
- Location: Araruama-RJ, Brazil
Re: MsgInfoEx
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
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
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: MsgInfoEx
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.
South or North HMG is worth.
...the possibilities are endless.
- srvet_claudio
- Posts: 2193
- Joined: Thu Feb 25, 2010 8:43 pm
- Location: Uruguay
- Contact:
Re: MsgInfoEx
Very nice!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.
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
MsgInfoEx
Hi Amarante,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.
I also agree in parts with you. I have read this:
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.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
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
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
- srvet_claudio
- Posts: 2193
- Joined: Thu Feb 25, 2010 8:43 pm
- Location: Uruguay
- Contact:
Re: MsgInfoEx
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:
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.
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
- Amarante
- Posts: 182
- Joined: Fri Apr 27, 2012 9:44 pm
- DBs Used: DBF, MySQL, MariaDB, SQLite, PostgreSQL
- Location: Araruama-RJ, Brazil
Re: MsgInfoEx
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.