# f522806d8f039803a63bce213793b56e99eaa9f4c1d43bd3c303e4de76def5df Elan 1.8.0 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
