Search found 20 matches

by PeWa
Fri Jun 20, 2025 11:35 am
Forum: Feature Requests and Wishlists
Topic: Editor: Blend out debug statements
Replies: 2
Views: 235

Editor: Blend out debug statements

The Purebasic Debugger toggle is a very nice feature: we can easily control the use of debug-statements in the sourcecode and can switch them on an off, so that the compiler ignores debug if we wish it.
However, if i found with debug all failures and errors, I start deleting all or most of the ...
by PeWa
Thu May 08, 2025 1:59 pm
Forum: Feature Requests and Wishlists
Topic: SELECT CASE with relational operators and ELSE CASE like Visual Basic and others
Replies: 23
Views: 3349

Re: SELECT CASE with relational operators and ELSE CASE like Visual Basic and others




Select item

CASE 1
candlevisible=1

; if you do a CASE ELSE here, you will never get a Check for CASE 2, CASE 3!
CASE ELSE candlevisible=0

CASE 2
lanternvisible=1
CASE ELSE lanternvisible=0

Endselect

EndProcedure


Stop the discussion!


I agree, Features and Wishlist is not the right ...
by PeWa
Thu May 08, 2025 1:39 pm
Forum: Feature Requests and Wishlists
Topic: SELECT CASE with relational operators and ELSE CASE like Visual Basic and others
Replies: 23
Views: 3349

Re: SELECT CASE with relational operators and ELSE CASE like Visual Basic and others



In your inventory example you are imagining hundreds of inventory items. A CASE ELSE is being used to update a variable showing each thing is visible or not visible depending on if it is the inventory item being used. If a SELECT/CASE is used it would not update the variables after the first ...
by PeWa
Thu May 01, 2025 2:59 pm
Forum: Feature Requests and Wishlists
Topic: SELECT CASE with relational operators and ELSE CASE like Visual Basic and others
Replies: 23
Views: 3349

Re: SELECT CASE with relational operators and ELSE CASE like Visual Basic and others



I also dont know about the use of the command BOOL in conjunktion with SELECT/ENDSELECT. To compare the SELECT variable with >,< ... was my original intend. Unfortunatly that way it is not possible to compare the SELECT Variable, because we must set the variable always to #true.Or am i wrong ...
by PeWa
Thu May 01, 2025 2:29 pm
Forum: Feature Requests and Wishlists
Topic: SELECT CASE with relational operators and ELSE CASE like Visual Basic and others
Replies: 23
Views: 3349

Re: SELECT CASE with relational operators and ELSE CASE like Visual Basic and others



I also dont know about the use of the command BOOL in conjunktion with SELECT/ENDSELECT. To compare the SELECT variable with >,< ... was my original intend. Unfortunatly that way it is not possible to compare the SELECT Variable, because we must set the variable always to #true.Or am i wrong ...
by PeWa
Thu May 01, 2025 2:05 pm
Forum: Feature Requests and Wishlists
Topic: SELECT CASE with relational operators and ELSE CASE like Visual Basic and others
Replies: 23
Views: 3349

Re: SELECT CASE with relational operators and ELSE CASE like Visual Basic and others



To find an example for my previous post, I quickly threw together a code sample. It didn't turn out particularly well, but it should illustrate what I mean:
the possibility of using CASE ELSE to set a variable or execute a procedure before another CASE occurs, because the subsequent one depends ...
by PeWa
Thu May 01, 2025 1:16 pm
Forum: Feature Requests and Wishlists
Topic: SELECT CASE with relational operators and ELSE CASE like Visual Basic and others
Replies: 23
Views: 3349

Re: SELECT CASE with relational operators and ELSE CASE like Visual Basic and others


While improvements of this nature can certainly be beneficial, Fred has expressed an opinion on Select last year :

PB supports multicase and the 'To' keyword which allow ranged tests, which is enough for case IMHO. If you need complex compare, If/ElseIf is the way. https://www.purebasic.fr ...
by PeWa
Tue Apr 29, 2025 9:27 pm
Forum: Feature Requests and Wishlists
Topic: SELECT CASE with relational operators and ELSE CASE like Visual Basic and others
Replies: 23
Views: 3349

Re: SELECT CASE with relational operators and ELSE CASE like Visual Basic and others

To find an example for my previous post, I quickly threw together a code sample. It didn't turn out particularly well, but it should illustrate what I mean:
the possibility of using CASE ELSE to set a variable or execute a procedure before another CASE occurs, because the subsequent one depends on ...
by PeWa
Tue Apr 29, 2025 7:49 pm
Forum: Feature Requests and Wishlists
Topic: SELECT CASE with relational operators and ELSE CASE like Visual Basic and others
Replies: 23
Views: 3349

Re: SELECT CASE with relational operators and ELSE CASE like Visual Basic and others

I just thought of another use case where CASE ELSE would actually make sense if DEFAULT is reached: namely, when, for a number like in the example, a procedure or something else must be executed BEFORE the next CASE query if there is no match.

But enough about that now; perhaps others can think of ...
by PeWa
Tue Apr 29, 2025 7:03 pm
Forum: Feature Requests and Wishlists
Topic: SELECT CASE with relational operators and ELSE CASE like Visual Basic and others
Replies: 23
Views: 3349

Re: SELECT CASE with relational operators and ELSE CASE like Visual Basic and others

As a note : my original intent was the relational operators, i believe they a useful.
I know, if someone wants to make a joke, he could say: "Use IF...THEN...ELSE" :-)
by PeWa
Tue Apr 29, 2025 6:48 pm
Forum: Feature Requests and Wishlists
Topic: SELECT CASE with relational operators and ELSE CASE like Visual Basic and others
Replies: 23
Views: 3349

Re: SELECT CASE with relational operators and ELSE CASE like Visual Basic and others



an enhancement of SELECT CASE was requested In old posts (2003,2004 ...), but relational operators are until today not implemented. In Visual Basic i see that relational operators like <,>, ... are implemented with the command IS, and there are also the ELSE CASE (or CASE ELSE ? :-) ) command. I ...
by PeWa
Tue Apr 29, 2025 4:15 pm
Forum: Feature Requests and Wishlists
Topic: SELECT CASE with relational operators and ELSE CASE like Visual Basic and others
Replies: 23
Views: 3349

SELECT CASE with relational operators and ELSE CASE like Visual Basic and others

an enhancement of SELECT CASE was requested In old posts (2003,2004 ...), but relational operators are until today not implemented. In Visual Basic i see that relational operators like <,>, ... are implemented with the command IS, and there are also the ELSE CASE (or CASE ELSE ? :-) ) command. I ...
by PeWa
Sun Feb 09, 2025 3:33 pm
Forum: Feature Requests and Wishlists
Topic: Retro Programming
Replies: 1
Views: 763

Retro Programming

I don't know if other people are interested in this at the moment, but I would like to do some retro programming, to be precise, Amiga and C64, as I had these computers when I was young.
C64 with Purebasic would of course be great too (perhaps a future feature? :-) Or maybe a tool? Anyone interested ...
by PeWa
Mon Jul 11, 2022 12:40 pm
Forum: AmigaOS
Topic: Any Amiga for download?
Replies: 6
Views: 41804

Re: Any Amiga for download?

I know, this is an old topic, but for everyone who is interested in Amiga programing,
there are many books now open source to download under archive.org:

https://archive.org/details/AmigaProgrammingGuide/Amiga%20Programming%20Guide/

or

https://archive.org/details/amiga-rom-kernal-reference-manual ...
by PeWa
Mon Jul 11, 2022 12:22 pm
Forum: Announcement
Topic: [WIN/MAC/Linux-64] SDL2 (+mixer,image,ttf,net) + modern OpenGL
Replies: 4
Views: 6085

Re: [WIN/MAC/Linux-64] SDL2 (+mixer,image,ttf,net) + modern OpenGL

Hi GPI,

is the translation of the C headers with the new PB6 version still necessary ?
SDL is now at version 2.0.22, is it easier to include it in PB6 ?