[Implemented] Boolean Expressions

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post by Dare2 »

:lol:
@}--`--,-- A rose by any other name ..
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

let's raise a fund for dmoc! :-)
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Post by Kaeru Gaman »

@blueznl

> perhaps i had a bad day...

may it be...

but perhaps some other people don't feel comfortable being tread as if they ask for something absolutely useless..

and perhaps they already searched the forum and read some discussions abot this feature..

and perhaps (i think quite sure) they don't understand at all why it is not supported and what the heck is the problem with it.

its's such a fundamental thing...

as already been said: even if its was supported, noone is forced to use it at all.

I'm sorry if I tread on your toes, but you started mockin' at me
And as loud you shout into the forest, the shout comes back...


so, peace now...

I'm seriously waiting for an answer, why this feature is not supported and if it will ever change...
oh... and have a nice day.
dmoc
Enthusiast
Enthusiast
Posts: 739
Joined: Sat Apr 26, 2003 12:40 am

Post by dmoc »

blueznl wrote:let's raise a fund for dmoc! :-)
Yer gonna need lots of money - I'm pretty ugly, especially when angry :P
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

oh don't worry, there's not much modern nuclear weapons cannot fix
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post by Dare2 »

:)

Actually, I have often wondered why the phrase "looks ugly" is considered a definitive and compelling reason for not implementing something. PureBasic is a wannabe beauty queen?
@}--`--,-- A rose by any other name ..
Thade
Enthusiast
Enthusiast
Posts: 266
Joined: Sun Aug 03, 2003 12:06 am
Location: Austria

Post by Thade »

or how about this:
Code:

Code: Select all

C = Asc(In$) : Hex = ((C>47)&(C<58)*(C-48))+((C>64)&(C<71)*(C-55))
I am on your side ... boolean expressions are a must in any Basic ... but your example code is a great argument against it ;)
You do not even test for a - f yet as the little code snippets below do (and you forgot some brackets - Hex in your code is always 0 - typical, a contra would say).

Code: Select all

C = Asc(In$) : Hex = (((C>47) & (C<58))*(C-48)) + (((C>64) & (C<71))*(C-55)) + (((C>96) & (C<103))*(C-87))

Code: Select all

Hex = Asc(In$)-48
if Hex>9
Hex=(Hex & 7) + 9
Endif
--------------
Yes, its an Irish Wolfhound.
Height: 107 cm; Weight: 88 kg
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

Kaeru Gaman wrote:and perhaps they already searched the forum and read some discussions abot this feature..

and perhaps (i think quite sure) they don't understand at all why it is not supported and what the heck is the problem with it.

its's such a fundamental thing...
Here is a hint for you:
http://freak.purearea.net/v4/ReadMe.html

Maybe the fact that this has not been implemented yet has something to do with
the size of the above list (and the fact that is full of fundamental things as well) ?

Just think about it for a while...
quidquid Latine dictum sit altum videtur
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Post by Kaeru Gaman »

@Thade

yap, i "forgot" the a-f... perhaps because i dont use them in my own conversions..

but i left the brackets on purpose:
& is always executed first, either because it has priority, or because it is first in line...


@freak
since the DONE-list is so huge, I just hope that the Boolean Expressions are on the ToDo-List...

...but they should have been on it since Ver1.0, so I wonder why they were'nt on the DONE maybe half a year ago?

...or even at least in this promised-land-like-version-four-point-oh...
oh... and have a nice day.
User avatar
utopiomania
Addict
Addict
Posts: 1655
Joined: Tue May 10, 2005 10:00 pm
Location: Norway

Post by utopiomania »

I posted this:

Code: Select all

N(1) = N(1) + (Yr % 4 = 0) | (Yr % 100 = 0) | (Yr % 400 = 0)
here:

http://www.purebasic.fr/english/viewtopic.php?t=17511

And got lots of brrr, brrr,s too. Same thing I think. I was told it was illegal in PB. Why this needs to be so is beyond me. :?
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

Everybody has a different opinion of what is important and what is not.
Don't think that the thing you want is the one and only feature.

In fact i do not consider this very important, as it does not really add new functionality to
the language, except a better score at the obfuscating code contest :)
quidquid Latine dictum sit altum videtur
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post by Dare2 »

:D
@}--`--,-- A rose by any other name ..
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Post by Kaeru Gaman »

> Everybody has a different opinion of what is important and what is not.

> as it does not really add new functionality


I think a lot of the customers would like this feature.
Of course you can also solve it with a couple of Ifs, and thats the reason,
why most who want this feature dont keep mourning for it.

But I think that the percentage of customers who would like this feature is high enough to consider this matter quite important.

A lot of the features that are added are born out of ideas of good programmers who suggest it and it was cosidered a good idea and is added, even if only few people ask for it and most won't miss it.

but try to remember how many people asked for Boolean Expressions since the first release, count every single customer who ever asked for it and didn't ask a second time just because 'ok, i can do a workaround'

I think there were enough requests to call it important.
oh... and have a nice day.
maw

Post by maw »

My take on this is simple. If this is implemented I will certainly have use for it, if not I'll get along just fine without it. Just as I got along fine without Not but use it now that it's here.

And in the end, it is up to Fred to decide what to spend his time on. He has a vision of what he wants PureBasic to become (atleast I assume he has :lol: ) We are in no way guaranteed this or that function. But we should consider us lucky to actually be this close to the developer that we are here.

As for myself, I'll never look at another language as long as I have PB no matter what Fred does or doesn't implement :D
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

freak wrote:Everybody has a different opinion of what is important and what is not.
Don't think that the thing you want is the one and only feature.

In fact i do not consider this very important, as it does not really add new functionality to
the language, except a better score at the obfuscating code contest :)
my hero, my champion! (blowing a platonic kiss)

:P
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
Post Reply