LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Best Architecture for Fortran Code with Line Numbers

Hi all,

 

I have large fortran 90 file (10+ pages) which I need to convert to LabVIEW.

 

It contains several branching statements with Line Numbers, e.g.:

 

1000 IF (condition) goto 2000

 

I would like to know what is the best architecture to deal with this branching of the program.

 

Should I break the sections (based on line numbers) into user events or states?

 

Has anyone done similar conversions? 

 

Cheers,

 

Battler.

 

0 Kudos
Message 1 of 4
(2,917 Views)
Message 2 of 4
(2,912 Views)

battler. wrote:

Hi all,

 

I have large fortran 90 file (10+ pages) which I need to convert to LabVIEW.

 

It contains several branching statements with Line Numbers, e.g.:

 

1000 IF (condition) goto 2000

 

I would like to know what is the best architecture to deal with this branching of the program.

 

Should I break the sections (based on line numbers) into user events or states?

 

Has anyone done similar conversions? 

 

Cheers,

 

Battler.

 


 

I would insert a preliminary step where I would assign a descriptive name to each line number that is the target of a branch. The names become the names of the states (like Christian was hinting at) then diagram the code into a state transition diagram. The rest gets passed to a developer to complete. Smiley Wink

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 4
(2,889 Views)

As Ben said, a state transition diagram will be very useful.  I am working with some old Fortran code and find it necessary to carefully diagram the execution path through the original code.  In several cases goto's are used to branch out of nested loops in complicated ways.  If you do not understand what the code is doing, translating it to another language may result in new code which executes but does the wrong calculation.

 

Lynn 

Message 4 of 4
(2,858 Views)