Skip to main content
Open topic with navigation CAPL Functions » General » Function Overview » _max

_max

Valid for: CANoe DE • CANoe:lite DE • CANoe4SW DE • CANoe4SW:lite DE

Function Syntax

  • long _max(long x, long y); // form 1
  • dword _max(dword x, dword y); // form 2
  • int64 _max(int64 x, int64 y); // form 3
  • qword _max(qword x, qword y); // form 4
  • float _max(float x, float y); // form 5

Description

Returns the maximum of the parameters.

Parameters

  • x: First operand
  • y: Second operand

Return Values

  • y > x ? y: x

Example

float result;
result = _max(1.0, _max(-3.0, 5.2)); // result == 5.2