Got an idea for enhancing PureBasic? New command(s) you'd like to see?
BackupUser
PureBasic Guru
Posts: 16777133 Joined: Tue Apr 22, 2003 7:42 pm
Post
by BackupUser » Wed Feb 12, 2003 12:37 pm
Restored from previous forum. Originally posted by GPI .
At the moment the compiler don't allow more than one argument for case.
But it would be nice to write more than one argument.
for example:
Code: Select all
select a
case 1,2,3
debug "is 1,2 or 3"
end_select
Also usefull:
Code: Select all
select a
case 1 to 3
debug "is in the range of 1 to 3"
end_select
PII 333, 256MB, Asus TNT2Ultra 32MB, AWE Gold 64 4MB
BackupUser
PureBasic Guru
Posts: 16777133 Joined: Tue Apr 22, 2003 7:42 pm
Post
by BackupUser » Wed Feb 12, 2003 3:14 pm
Restored from previous forum. Originally posted by plouf .
requested some times before (and from me
)
and i still hope
Christos
BackupUser
PureBasic Guru
Posts: 16777133 Joined: Tue Apr 22, 2003 7:42 pm
Post
by BackupUser » Wed Feb 12, 2003 6:19 pm
Restored from previous forum. Originally posted by Franco .
Originally posted by GPI
At the moment the compiler don't allow more than one argument for case.
But it would be nice to write more than one argument.
for example:
Code: Select all
select a
case 1,2,3
debug "is 1,2 or 3"
end_select
Also usefull:
Code: Select all
select a
case 1 to 3
debug "is in the range of 1 to 3"
end_select
PII 333, 256MB, Asus TNT2Ultra 32MB, AWE Gold 64 4MB
Yeah we had this long time ago, but Fred didn't had time to look into it.
Anyhow, I would also accept:
Case 1 Or 3 Or 5 To 9
Have a nice day...
Franco
BackupUser
PureBasic Guru
Posts: 16777133 Joined: Tue Apr 22, 2003 7:42 pm
Post
by BackupUser » Wed Feb 12, 2003 6:20 pm
Restored from previous forum. Originally posted by geoff .
I hate to keep piling on requests to Fred, but you
are right, this would make for tidy programming.
Especially in an example like:
case 89 to 213
At the moment, you'd need a separate If Then Else structure.
BackupUser
PureBasic Guru
Posts: 16777133 Joined: Tue Apr 22, 2003 7:42 pm
Post
by BackupUser » Wed Feb 12, 2003 6:22 pm
Restored from previous forum. Originally posted by MrVainSCL .
Mhhhhh... why not use:
If a=1 or a=2 or a=3
Else
Select a
case ...
EndSelect a
Endif
greetz
MrVainSCL! aka Thorsten
PIII450, 256MB Ram, 80GB HD + 6,4 GB, RivaTNT, DirectX9.0, SB AWE64, Win2000 + all Updates...
BackupUser
PureBasic Guru
Posts: 16777133 Joined: Tue Apr 22, 2003 7:42 pm
Post
by BackupUser » Wed Feb 12, 2003 7:30 pm
Restored from previous forum. Originally posted by Denis .
Hi all,
I agree too. - 100%
I think that Fred ToDo list is going to increase a lot.
Denis
BackupUser
PureBasic Guru
Posts: 16777133 Joined: Tue Apr 22, 2003 7:42 pm
Post
by BackupUser » Wed Feb 12, 2003 7:56 pm
Restored from previous forum. Originally posted by Manolo .
I remember the old ON GOTO...
I agree.
Manolo
BackupUser
PureBasic Guru
Posts: 16777133 Joined: Tue Apr 22, 2003 7:42 pm
Post
by BackupUser » Wed Feb 12, 2003 8:40 pm
Restored from previous forum. Originally posted by GPI .
@france
>Case 1 Or 3 Or 5 To 9
I don't think, that this is the correct form.
case 1,3, 5 to 9
must be correct.
PII 333, 256MB, Asus TNT2Ultra 32MB, AWE Gold 64 4MB
BackupUser
PureBasic Guru
Posts: 16777133 Joined: Tue Apr 22, 2003 7:42 pm
Post
by BackupUser » Wed Feb 12, 2003 8:47 pm
Restored from previous forum. Originally posted by Franco .
Originally posted by GPI
@france
>Case 1 Or 3 Or 5 To 9
I don't think, that this is the correct form.
case 1,3, 5 to 9
must be correct.
PII 333, 256MB, Asus TNT2Ultra 32MB, AWE Gold 64 4MB
...must be correct, why
BTW It's Franco and not GDI
Have a nice day...
Franco
BackupUser
PureBasic Guru
Posts: 16777133 Joined: Tue Apr 22, 2003 7:42 pm
Post
by BackupUser » Wed Feb 12, 2003 9:31 pm
Restored from previous forum. Originally posted by tranquil .
Originally posted by Franco
Originally posted by GPI
@france
>Case 1 Or 3 Or 5 To 9
I don't think, that this is the correct form.
case 1,3, 5 to 9
must be correct.
PII 333, 256MB, Asus TNT2Ultra 32MB, AWE Gold 64 4MB
...must be correct, why
BTW It's Franco and not GDI
Have a nice day...
Franco
Would make sense! I agree too!
Tranquilizer/ Secretly!
http://www.secretly.de
Registred PureBasic User
System: Windows 2000 Server, 512 MB Ram, GeForce4200 TI 128 MB DDR, Hercules Theater 6.1 DTS Sound
System 2: Mobile Pentium 4 2.4GHz 512 MB DDR GeForce4 420-32, Windows XP Home
BackupUser
PureBasic Guru
Posts: 16777133 Joined: Tue Apr 22, 2003 7:42 pm
Post
by BackupUser » Wed Feb 12, 2003 10:17 pm
Restored from previous forum. Originally posted by GPI .
@franco
sorry.
but i have never see something like "case 1 or 2". So it sounds wrong.
@tranquil
What would make sense?
PII 333, 256MB, Asus TNT2Ultra 32MB, AWE Gold 64 4MB