# ebb2b60fe2a1b3fe89c7b6de29a33879f6f692bf3fc636310d8ab7b0a69bdd5b Elan 1.6.1 guest default_profile valid

main
  print percent(11, 10)
end main

function percent(value as Float, maximum as Float) returns Float
  variable r set to 100.0
  if value > maximum then
    throw exception "proportion exceeds 100%"
  else
    set r to value/maximum*r
  end if
  return r
end function

function onAxis(xp as Float, yp as Float, xq as Float, yq as Float) returns Float
  if yp is 0 then
    throw exception "yp is zero: {xp},{yp} + {xq},{yq}"
  end if
  return xp*yp
end function
