Advertisement
C4Cypher

distance.m

Jul 22nd, 2014
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Prolog 0.35 KB | None | 0 0
  1. :- module distance.
  2.  
  3. :- interface.
  4.  
  5. :- import_module io.
  6.  
  7. :- pred main(io::di, io::uo) is det.
  8.  
  9. :- implementation.
  10.  
  11. :- import_module float.
  12.  
  13. :- type feet == float.
  14. :- type meters == float.
  15.  
  16. main(!IO) :-
  17.     F:feet = 3.0,
  18.     M:meters = 3.0,
  19.     F = M ->
  20.         print("Feet Equals Meters!\n", !IO)
  21.     ;
  22.         print("Feet and Meters are not the same!\n", !IO).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement