Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Benoit Barbot
GraphEditor
Commits
e46bc118
Commit
e46bc118
authored
Dec 21, 2018
by
Benoit Barbot
Browse files
prog
parent
804f049b
Pipeline
#981
passed with stage
in 30 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
editor/genericSerializer.ml
View file @
e46bc118
...
...
@@ -81,7 +81,20 @@ let float_buff b pos =
let
p
,
f
=
int_buff
b
pos
in
p
,
((
float_of_int
f
)
/.
100
.
)
(*let _ =
let
check
f
=
let
t
=
Buffer
.
create
10
in
buff_float
t
f
;
let
str
=
(
Bytes
.
to_string
@@
Buffer
.
to_bytes
t
)
in
print_buff
str
;
let
p1
,
f1
=
float_buff
str
0
in
print_endline
(
string_of_float
f
);
print_endline
(
string_of_float
f1
);
assert
(
f1
=
f
);;
check
(
10000
.
0
)
let
_
=
let
t
=
Buffer
.
create
100
in
for
i
=
-
1025
to
1020
do
buff_int
t
i
;
...
...
@@ -94,7 +107,7 @@ let float_buff b pos =
let
p1
,
i1
=
int_buff
str
!
pos
in
pos
:=
p1
;
print_endline
(
string_of_int
i1
);
done
*)
done
let
buff_string
b
str
=
let
n
=
String
.
length
str
in
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment