1. Corentin Derbois
  2. SmallCC

Commits

Corentin Derbois  committed 9bde67c

Add get method

  • Participants
  • Parent commits aaa2312
  • Branches develop

Comments (0)

Files changed (1)

File src/option.ml

View file
  • Ignore whitespace
     try
       if (Hashtbl.find options key = "yes") then true else false
     with
-      Not_found -> false
+      Not_found -> print_endline ("Option warning: " ^ key); false
 
+  method get key =
+    try
+      Hashtbl.find options key
+    with
+      Not_found -> print_endline ("Option warning: " ^ key); ""
 
 end