Skip to content

Instantly share code, notes, and snippets.

@jasongorman
Created March 31, 2019 09:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasongorman/3104b4c1da0502b15e03f25bfaeafda0 to your computer and use it in GitHub Desktop.
Save jasongorman/3104b4c1da0502b15e03f25bfaeafda0 to your computer and use it in GitHub Desktop.
program CarpetQuoteTest
implicit none
real quote
real price
real rectangular_room(2)
real circular_room(1)
external area_of_rectangular_room
external area_of_circular_room
rectangular_room(1) = 2.5
rectangular_room(2) = 2.5
price = quote(rectangular_room, 10.0, .FALSE., area_of_rectangular_room)
print*, "Quote for rectangular room (not rounded) = ", price
price = quote(rectangular_room, 10.0, .TRUE., area_of_rectangular_room)
print*, "Quote for rectangular room (rounded) = ", price
circular_room(1) = 2.5
price = quote(circular_room, 10.0, .FALSE., area_of_circular_room)
print*, "Quote for circular room (not rounded) = ", price
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment