From b5f6a7d9514adb711337a1386b2d494034c55842 Mon Sep 17 00:00:00 2001 From: Sage Vaillancourt Date: Wed, 30 Mar 2022 16:53:53 -0400 Subject: [PATCH] Add more colors to pebblisp.pbl Plus a type comment on (time) --- src/examples/pebblisp.pbl | 9 +++++++++ src/plfunc.h | 1 + 2 files changed, 10 insertions(+) diff --git a/src/examples/pebblisp.pbl b/src/examples/pebblisp.pbl index d7a3b3b..e5434bc 100644 --- a/src/examples/pebblisp.pbl +++ b/src/examples/pebblisp.pbl @@ -1,10 +1,19 @@ +(def black "") (def red "") (def green "") +(def yellow "") (def blue "") +(def purple "") +(def cyan "") +(def white "") + (def bold "") (def reset "") + (def nl (ch 10)) +(def reload (fn () (loadfile "/home/sagevaillancourt/.pebblisp.pbl"))) + (def hour (fn (ti) ( (def h (% ti's hour 12)) (if (= 0 h) 12 h) diff --git a/src/plfunc.h b/src/plfunc.h index bddc764..3844826 100644 --- a/src/plfunc.h +++ b/src/plfunc.h @@ -246,6 +246,7 @@ tfn(getEnvVar, "env", "(env HOME) => /home/sagevaillancourt" ); +/// () => struct Time fn(getTime, "time", "Get a struct of the current time with fields (minute hour sec)." );