Maybe something like this:
New Table( "Multiply",
Add Rows( 8 ),
New Column( "Term", Character, "Nominal",
Set Values( {"Name", "Place", "Animal", "Thing", "Name*Name", "Place*Thing",
"Animal", "Animal*Animal"} )
),
New Column( "Multiply", Numeric, "Continuous",
Format( "Best", 12 ),
Set Values( [0.43, 0.5567, 0.056, 0.236, 0.15503, 0.44479, 0.7789, 0.22754] )
),
New Column( "Result",
Expression,
"None",
Formula(
mtch = Regex Match( :Term, "([^*]*)\*([^*]*)" );
If(
N Items( mtch ) == 0, :Multiply * 2,
N Items( mtch ) == 3,
If( mtch[2] == mtch[3],
:Multiply,
:Multiply * 2
)
);
)
)
)