# 3a4045291b7cb57f3d8f78546e1f0bab46a739f95a185894ded972b87047ad85 Elan 1.8.2 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
