---
name: "getablexprmax"
section: "3"
platform: "linux"
package: "alliance"
version: "5.1.1-3"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/getablexprmax"
---

# getablexprmax(3)

applies a function to all operands.

## NAME

getablexprmax - applies a function to all operands.

## SYNOPSYS

```
#include "abl101.h"
chain_list ∗getablexprmax( Function, Expr )
  int       (∗Function)();
  chain_list ∗Expr;
```

## PARAMETERS

- *Function*

  Cost function.

- *Expr*

  Expression to scan.

## DESCRIPTION

**getablexprmax** applies the cost function *Function* to all operands of *Expr*.\

## RETURN VALUE

**getablexprmax** returns the operand for which unction gives the maximum cost. The expression pointer returned MUSTN'T be modified after the call to this function.

## ERRORS

getablexprmax error ...

## EXAMPLE

```
#include "abl101.h"
    int MapFunction( MapExpr )
      chain_list ∗MapExpr;
    {
      return( getabldepthexpr( MapExpr ) );
    }
    ...
    chain_list ∗Expr;
    chain_list ∗Expr1;
    Expr = createablbinexpr( ABL_AND,
                             createablatom( "a" ),
                             createablatom( "b" ) );
   Expr1 = getablexprmax( MapFunction, Expr );
```

## SEE ALSO

[**abl**(1)](/abl/1.md)
