Select kkeyCase 1
If player > 0
nstring$ = "CV"
If player = 1
SendNetworkData(ClientID,nstring$,2) :Else
SendNetworkData(ConnectionID,nstring$,2) :EndIf
EndIf
Gosub ClearValues
Case 2
Restored from previous forum. Originally posted by pusztry.
Just a quick question. I am new and I would actualy like advice, shouldn't you tab in after a 'select' case? I have been just wondering because the tool doesn't do that at the present time.
Restored from previous forum. Originally posted by Berikco.
I dit not do that, because is you have much code after last 'Case' , it seems there is something missing, there are two tabs.
That's wy i prefered to do the same as If Else Endif.
Select a
Case 1
blabla
Case 2
blabla
EndSelect
Select a
Case 1
blabla
Case 2
blabla
blabla
blabla
blabla
blabla
blabla
blabla
blabla
blabla
blabla
blabla ; not so nice, looks like something is missing here
EndSelect
If
blabla
Else
blabal
EndIf
Select a
Case 1
blabla
Case 2
blabla
blabla
blabla
blabla
blabla
blabla
blabla
blabla
blabla
blabla
blabla ; not so nice, looks like something is missing here
EndSelect
It may not look "nice" but it's the correct way to program.
Restored from previous forum. Originally posted by PB.
> depended on the programmer
I've always read that anything inside a block/loop/procedure is supposed
to be indented, as it clearly shows what belongs inside it. This rule
would therefore logically apply to 'Select...EndSelect' blocks too.
Restored from previous forum. Originally posted by Berikco.
Sorry, my other editor wich has on the fly formatting (GFA Basic), does format the same, no indent after select.
Select-case is not the same as if-endif.
So I'm NOT going to do it (mmmmm.... i read this elsewhere)
Restored from previous forum. Originally posted by Berikco.
It must be add at 3 places, il take a look later, will include with a extra argument to switch of/off.
BTW new version is comming.....default was also missing in selct-case