From 045d1c2809dfc1fff4d160034761ade320b2ac6e Mon Sep 17 00:00:00 2001 From: hanez Date: Sat, 27 Sep 2025 17:49:22 +0200 Subject: [PATCH] Some more example code and documentation on how to use includes. --- CMakeLists.txt | 2 +- examples/include_lib.fun | 2 ++ examples/include_local.fun | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 783a962..3e291d7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.16) -project(fun VERSION 0.6.0 LANGUAGES C) +project(fun VERSION 0.6.1 LANGUAGES C) set(CMAKE_C_STANDARD 11) set(CMAKE_C_STANDARD_REQUIRED ON) diff --git a/examples/include_lib.fun b/examples/include_lib.fun index f6468b2..ad9de94 100644 --- a/examples/include_lib.fun +++ b/examples/include_lib.fun @@ -11,6 +11,8 @@ // Demonstrates system library includes after installation to /usr/lib/fun +// includes can also be done with a leading # like in C, but some programmers maybe like more clean code without a +// leading #. include include diff --git a/examples/include_local.fun b/examples/include_local.fun index 51df0a2..b284f8d 100644 --- a/examples/include_local.fun +++ b/examples/include_local.fun @@ -10,7 +10,7 @@ */ // To test this you need to go to ./examples/ and test includes running ../build/fun include_local.fun -// Local includes are always relative from the $PWD. +// Local includes are always relative from the $PWD using "" and system includes are located at /usr/lib/fun using <>. // Demonstrates local include: // This resolves relative to the current working directory where 'fun' is executed.