04-19-2010 11:34 PM
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.
04-19-2010 11:53 PM
04-20-2010 08:40 AM
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. ![]()
Ben
04-21-2010 08:08 AM
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