projects
/
Faustine.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of https://scm.cri.ensmp.fr/git/Faustine
[Faustine.git]
/
interpreter
/
aux.ml
diff --git
a/interpreter/aux.ml
b/interpreter/aux.ml
index
5321349
..
0564c30
100644
(file)
--- a/
interpreter/aux.ml
+++ b/
interpreter/aux.ml
@@
-34,3
+34,9
@@
let remainder_float : float -> float -> float =
if (abs_float r) > ((abs_float f2) /. 2.) then
(if r *. f2 > 0. then (r -. f2) else (r +. f2))
else r;;
if (abs_float r) > ((abs_float f2) /. 2.) then
(if r *. f2 > 0. then (r -. f2) else (r +. f2))
else r;;
+
+let format_of_file : string -> string =
+ fun (path : string) ->
+ let fragments = Str.split (Str.regexp "\.") path in
+ let n = List.length fragments in
+ List.nth fragments (n - 1);;