Continue and Editor/Help

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
GPI
PureBasic Expert
PureBasic Expert
Posts: 1396
Joined: Fri Apr 25, 2003 6:41 pm

Continue and Editor/Help

Post by GPI »

Something like this would be nice:

Code: Select all

procedure Test(a)
Select a
  case 1
    Debug "1"
    continue
  case 2
    Debug "2"
  case 3:continue
  case 4:continue
  case 5
    Debug "3"
endselect
endprocedure
and additional: the editor don't find the right topic for
procedureCDLL

Also nothing about ProcedureCDLL in the help (i know, what this command does)

same for
DeclareDLL
DeclareCDLL

GPI

[edit]
change code a little bit

test(1) ; Debug "1":Debug "2"
test(2) ; Debug "2"
test(3) ; Debug "3"
test(4) ; Debug "3"
test(5) ; Debug "3"


GPI
Last edited by GPI on Mon Oct 06, 2003 7:13 pm, edited 1 time in total.
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6172
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

i don't get it, what would continue do?
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
GPI
PureBasic Expert
PureBasic Expert
Posts: 1396
Joined: Fri Apr 25, 2003 6:41 pm

Post by GPI »

blueznl wrote:i don't get it, what would continue do?
I change my first posting. Do you now know, what i mean?
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6172
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

yeah, i see... i'm not sure i would ever use it though... it tends to take away a little from the readability of the code, and while i have a strong preference for select...endselect i would go for if...else...endif in the specific situation you describe

you mean 'continue' as in 'make_the_next_case_condition_true' but that's a bit long for a keyword :-)
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
User avatar
Andre
PureBasic Team
PureBasic Team
Posts: 2156
Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:

Post by Andre »

@GPI: Continue is included in the help file at topic 'Break & Continue'. The description tells you, that its thought for Repeat, For, ForEach and While. Is the using in a Select block a hidden feature ?

All other is up to Fred to answer :D
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
GPI
PureBasic Expert
PureBasic Expert
Posts: 1396
Joined: Fri Apr 25, 2003 6:41 pm

Post by GPI »

Andre wrote:@GPI: Continue is included in the help file at topic 'Break & Continue'. The description tells you, that its thought for Repeat, For, ForEach and While. Is the using in a Select block a hidden feature ?

All other is up to Fred to answer :D
A big misunderstanding...

i know, that continue only work on loops. I want a extension, so that it also work on select -case (like in c, as i know.)
freedimension
Enthusiast
Enthusiast
Posts: 613
Joined: Tue May 06, 2003 2:50 pm
Location: Germany
Contact:

Post by freedimension »

GPI wrote:i know, that continue only work on loops. I want a extension, so that it also work on select -case (like in c, as i know.)
Nope, it's just the other way round. In C you have to tell the program to leave the Select Case by inserting a break. Your method would be more like forwarding.
User avatar
Andre
PureBasic Team
PureBasic Team
Posts: 2156
Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:

Post by Andre »

Upps, didn't notice that we here are in "Feature Requests and Wishlists" :wink:
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
Post Reply