Conversion from proprietary satellite control script language

Tim Rowe digitig at cix.co.uk
Tue Jun 20 17:25:00 EDT 2000


In article <394F99D4.C28E013D at hursley.ibm.com>, pduffin at hursley.ibm.com 
(Paul Duffin) wrote:

> TJ Judson wrote:
> > 
> > I'm afraid my only other answer is to use a language that supports
> > "goto", like Tcl.
> > 
> 
> Tcl does not support goto.
> 
> I think that it should be possible to analyse all the possible paths
> through your satellite scripting language so that you create a graph
> of flow, in those cases where you see a goto you *simply* replace
> it with something else which does the job.
> 

I once had to port some BASIC code that had a pseudocode structure of the 
form:

def foo:
   # some code
label1:   
   # some code
   if test1:
      goto label2
   # some code
   
def bar:
   # some code
label2:   
   # some code
   if test1:
      goto label1
   # some code
   
It took me ages to unwrap. Rather than try to port such code, I would 
always assume that it's probably buggy anyway and re-implement it!



More information about the Python-list mailing list