convert all fields that are reference by value to _V
for SoloII syntax references, replace f(x) with three steps:
x_2 = f(x)
x = x_2
DELETE(x_2)
Further notes and discussion:
Brad was testing the latest release using the script editor. For example, with the script ... REMOVE_RING(VEL) (a) the script ran without an error message, but Brad noticed that no new field variable appeared in the list in the Parameter Color Dialog. Also, Brad noticed there was no change to the VEL field.
The explanation. The syntax of the script is not incorrect, and in fact this is the standard syntax for SoloII. In HawkEdit, the script editor and script engine uses a JavaScript-like syntax, and the syntax is more "functional". With a functional syntax, the result of the REMOVE_RING function needs to be saved in a variable. For example, VEL = REMOVE_RING(VEL) or VEL_2 = REMOVE_RING(VEL) In the first case, the field VEL would have the changes. In the second case, a new field, VEL_2 is created and contains the results of the REMOVE_RING function.
We talked about handling the syntax from (a), since it is so familiar to SoloII users. This syntax can be handled in a preprocessing step prior to evaluation by the script engine. The other preprocessing step that needs to happen is the conversion of the field variables "passed by value". The preprocessing step needs code development and is added to the task list.
Another point to note from testing by Brad and Alex is the copy syntax. To copy a field, the current syntax is ... VEL_NEW = VEL_V where the original field is VEL. Note the _V syntax appended to the original field. The _V syntax identifies a field as pass by value. This preprocessor step will handle the conversion of field names to either pass by value or pass by reference since it is context dependent. Until the preprocessor code is working, use the _V syntax when copying a field.
Further notes and discussion: Brad was testing the latest release using the script editor. For example, with the script ... REMOVE_RING(VEL) (a) the script ran without an error message, but Brad noticed that no new field variable appeared in the list in the Parameter Color Dialog. Also, Brad noticed there was no change to the VEL field.
The explanation. The syntax of the script is not incorrect, and in fact this is the standard syntax for SoloII. In HawkEdit, the script editor and script engine uses a JavaScript-like syntax, and the syntax is more "functional". With a functional syntax, the result of the REMOVE_RING function needs to be saved in a variable. For example, VEL = REMOVE_RING(VEL) or VEL_2 = REMOVE_RING(VEL) In the first case, the field VEL would have the changes. In the second case, a new field, VEL_2 is created and contains the results of the REMOVE_RING function.
We talked about handling the syntax from (a), since it is so familiar to SoloII users. This syntax can be handled in a preprocessing step prior to evaluation by the script engine. The other preprocessing step that needs to happen is the conversion of the field variables "passed by value". The preprocessing step needs code development and is added to the task list.
Another point to note from testing by Brad and Alex is the copy syntax. To copy a field, the current syntax is ... VEL_NEW = VEL_V where the original field is VEL. Note the _V syntax appended to the original field. The _V syntax identifies a field as pass by value. This preprocessor step will handle the conversion of field names to either pass by value or pass by reference since it is context dependent. Until the preprocessor code is working, use the _V syntax when copying a field.