1
0
Fork 0
forked from fun/fun

Some documentation update. No code changes. (0.37.48)

This commit is contained in:
Johannes Findeisen 2026-01-13 22:38:45 +01:00
commit 85b8d37b23
2 changed files with 16 additions and 1 deletions

View file

@ -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%
*/

4
examples/progress_inline.fun Normal file → Executable file
View file

@ -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%
*/