/fieldname {Field dup [T]detrend-bfl sub} def fieldname T last VALUE fieldname T first VALUE sub
Fieldname can not be the name of a current Ingrid command. Some command names can be found here. Also avoid fieldname index.