Some documentation update. No code changes. (0.37.48)
This commit is contained in:
parent
44cf629016
commit
85b8d37b23
2 changed files with 16 additions and 1 deletions
|
|
@ -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
4
examples/progress_inline.fun
Normal file → Executable 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%
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue