In Jam5, the cat verb was used for variable and widget assignment and there were two different targets of cat statements
If the target of a cat assignment begins with a pound sign (#), a plus sign (+) or a minus sign (-), then it is a field reference-this is easily seen because variable names cannot have these characters as part of the name. Regular variable names consist of alphanumeric characters, the underscore (_), the exclamation point (!), the period (.) and the dollar sign ($). (Note that the ! was added to variable names in Jam7-the rest of these characters could have been used in variable names in Jam5)
cat field1 "This is a test"
field1 = "This is a test"
cat field2 "This" "is" :test_field
field2 = "This" ## "is" ## test_field
cat zip(6,5) "-" zip_extension
zip(6,5) = "-" ## zip_extension
cat #5 "212-267-7722"
This must be replaced by the name of the widget being referred to. If this widget is named ph_number, then the replacement code would be:
ph_number = "212-267-7722".
cat +1 "my_data" or
cat #+1 "my_data"
This assigns the field that is +1 after the current widget to be the value "my_data". Note that the first form that omits the # will be recognized as a syntax error in Jam7, but would have been accepted in Jam5. Only the second form, which includes the #, works in Jam7, but is undocumented.
cat #-2 "me_too"
This is similar to the above, but refers to the field that is 2 fields before the current one.
cat #+0 "data value" or
cat #-0 "data_value"
@widget("@current") = "data_value"
This zero value performs an assignment to the current widget. Instead of using the widget name in the replacement code, the suggested new code will work at all times.
cat #:OV_FLDNUM 0
@field_num(OV_FLDNUM) = 0.
Colon Expansion occurs before variable assignment, so OV_FLDNUM must contain a number specifying the field to receive the value zero.
Note: In general, the usage of hard-coded widget field numbers should be eliminated, since field numbers are entirely dependent upon the specific layout of widgets on a screen. A little widget rearrangement on a screen could change the field numbers on all widgets on a screen. In addition, when a screen is converted from Jam5 to Jam7, the actual # of fields on a screen will often change, which will also require field number recalculation.