From 7ab53bee60d9714f756481f7619246a5552ec902 Mon Sep 17 00:00:00 2001 From: Alexander Zhirov Date: Mon, 8 Nov 2021 18:43:59 +0300 Subject: [PATCH] using the module file --- src/example_3/source/app.d | 7 +------ src/example_3/source/fun.d | 7 +++++++ 2 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 src/example_3/source/fun.d diff --git a/src/example_3/source/app.d b/src/example_3/source/app.d index a552dfd..4dcae97 100644 --- a/src/example_3/source/app.d +++ b/src/example_3/source/app.d @@ -1,10 +1,5 @@ import std.stdio; - -void fun(ref uint x, double y) -{ - x = 42; - y = 3.14; -} +import fun_; void main() { diff --git a/src/example_3/source/fun.d b/src/example_3/source/fun.d new file mode 100644 index 0000000..f19e916 --- /dev/null +++ b/src/example_3/source/fun.d @@ -0,0 +1,7 @@ +module fun_; + +void fun(ref uint x, double y) +{ + x = 42; + y = 3.14; +} \ No newline at end of file