Supported code with names without descriptive variables
I am working with LexisNexis VisualFiles, whose scripting language does not allow variable names to be described - all it does are "temporary fields" and "local fields" named TF01, TF02 or LF01, LF02, etc. Other data comes from "entity", so a descriptive name for any entity, such as "selectedent.EN01".
It's terribly difficult to maintain, especially since a lot of what I'm editing wasn't commented on when it was written. In particular, if I find that I need to use a new variable after writing a block of code, I find that I am just trying to reinvent variable numbers that I reasonably defined have not been used anywhere. Does anyone have any suggestions on how to make the code so readable and maintainable without manually commenting out each line?
Edit: this is not ECL, it is a scripting language for Visualfiles. There are no resources I can find online, my only link is the help file that comes with the software. This is the code I'm trying to decode:
[&Assign LF12=""] [&Assign LF13=""] [&Assign LF10=ARAN_AAFOO.en02] [&Assign LF11=ARAN_AAFOO.EN56] [&Assign LF12=ARAN_AAFOO.ABAR_ARAN.DET03] [&Assign LF13=ARAN_AAFOO.ABAR_ARAN.DET02] [&If LF12<> "This" &And LF12 <> "That"] [&If LF13=""] [&Assign LF13="Something"] [&Else] [&Assign LF13=LF13] [&EndIf] [&If DET12="Yes"] **priority [&Assign LF35="Top"] [&Assign LF36="abnormal"] [&Else] [&Assign LF35="Bottom"] [&Assign LF36="normal"] [&EndIf]
Any variable can be any type, so I'm looking for a system to help me organize and keep track of what I write - if "comment everything" is the only solution that's fine too.
source to share
Unfortunately, there is no easy way with this. Perhaps initialize the LF fields at the top of the script with a comment next to each LF as to what it refers to. It is worth remembering that LF fields are local so that only script \ document and TF are in the session, that is, they will pass between scripts. It is worth trying to use LF fields where possible. You can also right click on a field like DET12 in your example and it will give you the field label.
This is all pretty messy and without prior knowledge of DB fields and good commenting can be a nightmare to keep someone else running.
source to share