From 85b8d37b235160fc295d799e3fd45cae58bdf444 Mon Sep 17 00:00:00 2001 From: hanez Date: Tue, 13 Jan 2026 22:38:45 +0100 Subject: [PATCH] Some documentation update. No code changes. (0.37.48) --- examples/progress.fun | 13 ++++++++++++- examples/progress_inline.fun | 4 ++++ 2 files changed, 16 insertions(+), 1 deletion(-) mode change 100644 => 100755 examples/progress_inline.fun diff --git a/examples/progress.fun b/examples/progress.fun index 82f754b..70bd0fc 100755 --- a/examples/progress.fun +++ b/examples/progress.fun @@ -11,7 +11,9 @@ * Added: 2026-01-12 */ -// Demonstrates system library includes after installation to /usr/lib/fun +// Realtime progress bar demo without printing extra newlines. +// It only updates a single console line in-place. The progress() +// helper emits one trailing newline automatically at 100%. // includes can also be done with a leading # like in C, but some programmers maybe like more clean code without a // leading #. @@ -40,3 +42,12 @@ phase_total = 60 for i in range(0, phase_total + 1) c.progress(i, phase_total, "Phase 2") sleep(15) + +/* Expected output: +Progress demo: 0..100 +Downloading [=============================================================] 100% + +Multiple phases demo +Phase 1 [=================================================================] 100% +Phase 2 [=================================================================] 100% +*/ diff --git a/examples/progress_inline.fun b/examples/progress_inline.fun old mode 100644 new mode 100755 index 42cb3b8..380375c --- a/examples/progress_inline.fun +++ b/examples/progress_inline.fun @@ -27,3 +27,7 @@ for i in range(0, total + 1) // Done. No additional prints/newlines here; progress() already // finalized the line when it reached 100%. + +/* Expected output: +Downloading [=============================================================] 100% +*/