logic vs conditional

New to FreeBASIC? Post your questions here.
Trinity
Posts: 214
Joined: Sep 16, 2017 17:07

Re: logic vs conditional

Post by Trinity »

MrSwiss wrote:Newer boolean 'eval': AndAlso / OrElse, can also be written *old style* (with And / Or)
Thank you MrSwiss , it's starting to sink in now (though I need to study more) .
It appears that I always considered it all to be Boolean logic only (enhanced by some mathematics I once learned) .
Until I master it better I think that I will try to stick with the Boolean logic as much as I can.

P.S.
Ref. :
https://en.wikipedia.org/wiki/Boolean_algebra
https://en.wikipedia.org/wiki/Boolean_data_type
Last edited by Trinity on Oct 03, 2017 10:08, edited 1 time in total.
MrSwiss
Posts: 3910
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: logic vs conditional

Post by MrSwiss »

lol, simpler ... :

Code: Select all

#Define IsTrue(e)   ( CBool(e) )
#Define IsFalse(e)  ( CBool((Not e)) )
just a macro ... ?
Trinity
Posts: 214
Joined: Sep 16, 2017 17:07

Re: logic vs conditional

Post by Trinity »

MrSwiss wrote:lol, simpler ... :
And just as I thought that focusing on "BOOLEAN" would make it all simpler (LOL) , try reading the "Notes on definition of boolean data type" : https://www.freebasic.net/wiki/wikka.ph ... yPgBoolean
Anyway , there is hope for me yet , as it clearly says at end of definition description that : "However, the purpose and intent of the boolean data type remains, that it should only ever hold a True value or False value, regardless of the underlying details." ;-)
deltarho[1859]
Posts: 4310
Joined: Jan 02, 2017 0:34
Location: UK
Contact:

Re: logic vs conditional

Post by deltarho[1859] »

So, a guy has an idea. Then someone comes in with "That can be done easier:", which is an obvious improvement.

Then someone else comes in with a quantum improvement but instead of writing 'Much simpler ...:' writes "lol, simpler ...:" and closes with "just a macro ... ?"

grindstone's response is the correct way. MrSwiss' response is not. Sadly, MrSwiss' response, in my opinion, is typically deplorable and may put people off bothering to post any ideas. YES?
MrSwiss
Posts: 3910
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: logic vs conditional

Post by MrSwiss »

deltarho[1859] wrote:Sadly, MrSwiss' response, in my opinion, is typically deplorable and may put ...
You seem to have at least 2 problems:
  • 1) thinking, that everybody here, has a english major (degree) and,
    2) * putting every word on a Micro-Balance
Why not, for once, take it, as it was written: "quick hack" like?

* translated from german: "jedes Wort auf die Goldwaage legen"

Btw: this is a *coding* forum, and not a *language* forum ...
(a complaint, I've had to read from english-speakers, on german *coding* forums!)
deltarho[1859]
Posts: 4310
Joined: Jan 02, 2017 0:34
Location: UK
Contact:

Re: logic vs conditional

Post by deltarho[1859] »

MrSwiss wrote:You seem to have at least 2 problems:
I have a lot more than two problems and am pleased to report that the current number is much less than once they were; admittedly according to my determination but, in practice, seems to be true. However, the two you cite are not amongst them and, seem to me, to be 'red herrings'.
Why not, for once, take it, as it was written: "quick hack" like?
A condescending attitude will be seen whether words are written 'quick hack' like or considerd and whether or not the reader's first language is English.

I could, of course, try and develop a thick skin with regard condescension but have never done so nor will ever do so but, instead, assume the stance of condemnation with the utmost vigour.
grindstone
Posts: 862
Joined: May 05, 2015 5:35
Location: Germany

Re: logic vs conditional

Post by grindstone »

MrSwiss wrote:Btw: this is a *coding* forum, and not a *language* forum ...
(a complaint, I've had to read from english-speakers, on german *coding* forums!)
Why that? Did you complain about their bad german? <grin>
MrSwiss
Posts: 3910
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: logic vs conditional

Post by MrSwiss »

grindstone wrote:Why that? Did you complain about their bad german? <grin>
No, not me (for that one), others where more interested, teaching "german", instead of: giving answers to their questions ... <grin>
I've usually switched to english ...
Post Reply