Action applying to two things and a value?

I know it’s possible to make an I7 action apply to three things with a bit of I6 hacking, but is it possible to do the same thing with a kind of value? For example, could I create a “transfer [volume] from [fluid container] to [fluid container]”-style verb which would use the variables noun, second noun, and [value] understood?

I thought someone else would respond, but yeah, it’s very possible. The process is even simpler because you don’t have to make or wire up new storage for the value understood; value GPRs put their result in parsed_number (the [kind] understood), which is distinct from noun and second.

[code]There is a room. Here is a fire hose; here is an umbrella-testing chamber.
A volume is a kind of value. 999L specifies a volume.
Transferring is an action applying to two things.
The transferring action translates into I6 as “transfer”.

[[Code to generate a volume GPR, which I then copied from Build/auto.inf and renamed and added a line to:]
Fooing is an action applying to one volume.
Understand “foo [a volume]” as fooing.]
Include (-
[ Kind_GPR_litre original_wn group_wn v wpos mid_word matched_number cur_word cur_len cur_addr sgn tot f w rv x;

! Added line: Hide the litres parameter from Inform, so that it doesn't clear the noun. 
--parameters;

original_wn = wn;
! 999l, with offset=0, multiplier=1

wpos = 0; mid_word = false; matched_number = 0;
if (mid_word == false) {
    cur_word = NextWordStopped(); wn--;
    if (cur_word == -1) jump Failed_LP_0;
}
if (mid_word == false) {
    mid_word = true;
    wpos = 0;
    cur_addr = WordAddress(wn);
    cur_len = WordLength(wn);
}
sgn = 1; tot = 0; f = false;
if (cur_addr->wpos == '-') jump Failed_LP_0;
while ((wpos < cur_len) && (DigitToValue(cur_addr->wpos)>=0)) {
    f = DigitToValue(cur_addr->wpos);
    if (sgn == 1) {
        if ((tot > 214748364) || ((tot == 214748364) && (f > 7)))
            jump Failed_LP_0;
    } else {
        if ((tot > 214748364) || ((tot == 214748364) && (f > 8)))
            jump Failed_LP_0;
    }
    tot = 10*tot + f;
    f = true;
    wpos++;
}
if (f == false) jump Failed_LP_0;
tot = 1*tot + matched_number;
matched_number = tot;
if (wpos == cur_len) {
    wn++; mid_word = false;
}
if (mid_word == false) {
    cur_word = NextWordStopped(); wn--;
    if (cur_word == -1) jump Failed_LP_0;
}
if (mid_word == false) {
    mid_word = true;
    wpos = 0;
    cur_addr = WordAddress(wn);
    cur_len = WordLength(wn);
}
if (cur_addr->wpos++ ~= 'l') jump Failed_LP_0;
if (wpos == cur_len) {
    wn++; mid_word = false;
}
.Succeeded_LP_0;
if (mid_word) jump Failed_LP_0;
if (sgn<0) matched_number = -1*matched_number;
parsed_number = matched_number;
parsed_number = 1*parsed_number + 0+x;
if (parser_trace >= 3) { print "  [parsed value ", parsed_number, " by: 999l]^"; }
return GPR_NUMBER;
.Failed_LP_0;
wn = original_wn;
return GPR_FAIL;

];
-).

[Understand “transfer [a volume] from [something preferably held] to [something]” as transferring.]
Include (-
Verb ‘transfer’
* Kind_GPR_litre ‘from’ held ‘to’ noun -> transfer
;
-).

Report transferring:
say “You transfer [the volume understood] from [the noun] to [the second noun].”

Test me with “transfer 60L from the fire hose to the umbrella-testing chamber”.
[/code]
There’s still the issue that stored actions won’t store the transfer amount, but code like that above should cover the parsing side.

Thank you, this is quite useful.