Gosub Within Procedure

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
akj
Enthusiast
Enthusiast
Posts: 668
Joined: Mon Jun 09, 2003 10:08 pm
Location: Nottingham

Gosub Within Procedure

Post by akj »

As local labels are available in PB 5.10, could Gosubs now be permitted within procedures?
This will make it much quicker to convert programs written in old Basic dialects to PB.

I would like code such as the following to work:

Code: Select all

EnableExplicit

Procedure P()
Protected i
For i = 1 To 4
  Gosub Here
Next i
ProcedureReturn
Here:
  Debug i
Return
EndProcedure

P()
End
Anthony Jordan
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: Gosub Within Procedure

Post by Kwai chang caine »

+ 1 8)
ImageThe happiness is a road...
Not a destination
Ulix
User
User
Posts: 48
Joined: Wed Jan 23, 2008 12:45 pm
Location: France, Montpellier

Re: Gosub Within Procedure

Post by Ulix »

+ 1 :evil:

(Already ask, but just nothing!) Google translation
Post Reply