Tip: If/Then in PureBasic!

Share your advanced PureBasic knowledge/code with the community.
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

> The sense of this discussion escapes me!

IT'S A RESPONSE TO REQUESTS FOR IF/THEN! GET IT THROUGH YOUR HEADS!

> The only reason for using any new keywords should be the improvement of PureBasic

Good! Whatever! I'm responding to requests for If/Then. If you don't want it, then
don't use it. Nobody's twisting your arm. Why this thread is under attack about it is
beyond me! Why don't we all start attacking every other tip then? :evil:

Tips 'n' Tricks is just that -- it's NOT the section for improvements to the language!
Did I ever say: "This is how PureBasic should do decisions from now on?" NO!
One man's tip is another man's crap. Like it or lump it, but don't dump on those
who go to the trouble of assisting others who asked for something. Amazing. :roll:
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4789
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Post by Fangbeast »

I vote with you PB. I've always wondered why others feel the need to crap on others when they make a tip or trick instead of trying to make it better, test it, give decent suggestions.

This should be a sticky. "Tips and tricks: To help other people. If you don't like it, keep your trap shut. This section is a help section, not an ego tripping section and not a personal blog"

I've seen too many good people not make any tips and tricks any more for people always cutting them to shreds. Good on you for having the guts to continue.
Amateur Radio/VK3HAF, (D-STAR/DMR and more), Arduino, ESP32, Coding, Crochet
User avatar
IceSoft
Addict
Addict
Posts: 1682
Joined: Thu Jun 24, 2004 8:51 am
Location: Germany

Post by IceSoft »

PB wrote:I'm responding to requests for If/Then. If you don't want it, then don't use it.:
For using it have to be implemented first. And that is only @Freds decision.
Belive! C++ version of Puzzle of Mystralia
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post by Dare2 »

IceSoft wrote:
PB wrote:I'm responding to requests for If/Then. If you don't want it, then don't use it.:
For using it have to be implemented first. And that is only @Freds decision.
Hi IceSoft, it is not a request for "then". It was just a macro to give a do-nothing "then" for those who might want it. Quite innocent and not something to go to war over. :)


A lot of this thread is people having fun.

A lot more is people misunderstanding what is going on. For example, helpy says "The sense of this discussion escapes me!". Now that can be interpreted as "what is this thread actually about?" or it can be interpreted as a direct attack on the macro, or as something else altogether.

Reader decides, based on readers temperment.


Sometimes the misunderstandings are funnier than the attempts at humour. :D


Anyhow, the cavalry is on the horizon - lots of high horses are being mounted. :)
@}--`--,-- A rose by any other name ..
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

> For using it have to be implemented first

Do you mean my macro? Of course it has to be added to the top of any
source code using it. If you don't want If/Then, then don't add it. Simple.

> And that is only @Freds decision

Um... what? A tip has nothing to do with Fred. Do you even know what's
being discussed here? The concept behind it? It's a tip for doing a handy
version of If/Then FOR THOSE THAT WANT IT. Fred has no say in it! :roll:

Let's compare for a moment: there are NO native Registry commands for
PureBasic yet. So are all the tips here, for Registry manipulation, just as
useless, or their threads just as senseless? No, because they fill a need for
what people requested... JUST AS THIS TIP DOES. Now do you understand?

@Fangbeast: Thank you! ;)
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

> Hi IceSoft, it is not a request for "then"

Hmm, that may indeed be the problem... confusing "request" with "tip".

> or it can be interpreted as a direct attack on the macro

That's how I see it. :? I need a damn beer now so bad...
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post by Dare2 »

Well, in lieu of a beer, take this interpretation:

"Whats all the hoo-haw about? The reasons for such a heavy discussion about a simple tip eludes me!"

Which is way friendly and probably more on the mark. "Discussion" not "Macro" being the thing that was addressed.

But if you have a beer to hand, quaff that. :)


Edit: And shoot rings. Or - ooga booga - club him senseless. He started it. :P :lol:
@}--`--,-- A rose by any other name ..
User avatar
helpy
Enthusiast
Enthusiast
Posts: 552
Joined: Sat Jun 28, 2003 12:01 am

Post by helpy »

Dare2 wrote:...
For example, helpy says "The sense of this discussion escapes me!". Now that can be interpreted as "what is this thread actually about?" or it can be interpreted as a direct attack on the macro, or as something else altogether.
To make it clear: I ment the discussion! If there would not have been any senseless discussion, I would not have posted anything.

cu, helpy
User avatar
IceSoft
Addict
Addict
Posts: 1682
Joined: Thu Jun 24, 2004 8:51 am
Location: Germany

Post by IceSoft »

Dare2 wrote:A lot of this thread is people having fun.
That is it why I am here :wink:
Belive! C++ version of Puzzle of Mystralia
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4789
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Post by Fangbeast »

Dare2. Help me out here. I want to hold IceSoft and Helpy down for a while and belt them around with a rubber chicken called George.

Then let's send the jet around to PB with a ton of beers and some Milo and soy milk for me.


P.s. I keep the loose women.
Amateur Radio/VK3HAF, (D-STAR/DMR and more), Arduino, ESP32, Coding, Crochet
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

>> A lot of this thread is people having fun.
> That is it why I am here :wink:

I get angry too easily, which I guess is entertaining for others. :lol:
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
User avatar
IceSoft
Addict
Addict
Posts: 1682
Joined: Thu Jun 24, 2004 8:51 am
Location: Germany

Post by IceSoft »

Fangbeast wrote:Dare2. Help me out here. I want to hold IceSoft and Helpy down for a while and belt them around with a rubber chicken called George.
Ohhh please take a caging chicken please.
'Bird flu' you unterstand ?
Belive! C++ version of Puzzle of Mystralia
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4789
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Post by Fangbeast »

IceSoft wrote:
Fangbeast wrote:Dare2. Help me out here. I want to hold IceSoft and Helpy down for a while and belt them around with a rubber chicken called George.
Ohhh please take a caging chicken please.
'Bird flu' you unterstand ?
MWUAHAHAHAH (Evil Grin(c) Fang Enterprises, 2006)
Amateur Radio/VK3HAF, (D-STAR/DMR and more), Arduino, ESP32, Coding, Crochet
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post by Dare2 »

:D



Edit:

I was just thinking - a novel approach for me - that many people who post here are not natively English speaking.

So the misunderstandings here are quite small considering.

Hats off. Props to people who dare to post here and risk ridicule. Also props to the English speaking people here who don't ridicule. It is all quite inspiring, when you consider it.
@}--`--,-- A rose by any other name ..
User avatar
Rings
Moderator
Moderator
Posts: 1435
Joined: Sat Apr 26, 2003 1:11 am

Post by Rings »

Dare2 wrote: And shoot rings. Or - ooga booga - club him senseless. He started it. :P :lol:
uups.
don't misunderstood me,
i love the 'THEN' argument.
coz i'm a VB(.NET) 'ler and always
type the THEN, also when switching
from VisualStudio 2 PB-IDE.

So for me, the THEN Macro is realy very
usefull.
less typing errors, better reading (in my mind)
of the code.

Hands up PB !

And all other who are against THEN,
shut up and start another basic language
2 see difference.

now back 2 bed...
SPAMINATOR NR.1
Post Reply