# 1c1f7cb83d29c29a0f96ba62345c31e0e92a9b192f1f12ccc427b1f80da2cf9a Elan 1.6.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
