]> Repositorios git - scryer-prolog.git/commitdiff
reflect improved determinism thanks to the improvements by @notoria
authorMarkus Triska <[email protected]>
Tue, 22 Dec 2020 22:55:40 +0000 (23:55 +0100)
committerMarkus Triska <[email protected]>
Tue, 22 Dec 2020 23:05:29 +0000 (00:05 +0100)
src/lib/charsio.pl
src/lib/crypto.pl
src/lib/files.pl
src/lib/format.pl
src/lib/os.pl
src/lib/time.pl

index 712238844841793e7ca2933a31904637a4c841d9..05681bc3d7881b66cfd7d26bde88db780114d299 100644 (file)
@@ -212,8 +212,7 @@ read_line_to_chars(Stream, Cs0, Cs) :-
    Example:
 
       ?- chars_base64("hello", Bs, []).
-         Bs = "aGVsbG8="
-      ;  false.
+         Bs = "aGVsbG8=".
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
 chars_base64(Cs, Bs, Options) :-
index e88113c73d96da923bfdd1970117f3c915486a25..0e31f3de2497b99383362cbf6d393fd4c2cd5c3b 100644 (file)
@@ -58,8 +58,7 @@
    Example:
 
    ?- hex_bytes("501ACE", Bs).
-      Bs = [80,26,206]
-   ;  false.
+      Bs = [80,26,206].
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
 
@@ -146,7 +145,7 @@ must_be_byte_chars(Chars, Context) :-
    ?- crypto_n_random_bytes(32, Bs),
       bytes_integer(Bs, I).
       Bs = [146,166,162,210,242,7,25,132,64,94|...],
-      I = 337420085690608915485...(56 digits omitted)
+      I = 337420085690608915485...(56 digits omitted).
 
    The above relation also works in the other direction, letting you
    translate an integer _to_ a list of bytes. In addition, you can
@@ -155,7 +154,7 @@ must_be_byte_chars(Chars, Context) :-
 
    ?- crypto_n_random_bytes(12, Bs),
       hex_bytes(Hex, Bs).
-      Bs = [34,25,50,72,58,63,50,172,32,46|...], Hex = "221932483a3f32ac202 ..."
+      Bs = [34,25,50,72,58,63,50,172,32,46|...], Hex = "221932483a3f32ac202 ...".
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
 
@@ -190,8 +189,7 @@ crypto_random_byte(B) :- '$crypto_random_byte'(B).
    Example:
 
    ?- crypto_data_hash("abc", Hs, [algorithm(sha256)]).
-      Hs = "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad"
-   ;  false.
+      Hs = "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad".
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
index 512c757c7a70e6246d845fed8deac7061b504554..e88f53a204b34ca7fc1ca6b0413b8a2d3538f3c1 100644 (file)
@@ -166,19 +166,16 @@ file_time_(File, Which, T) :-
    Examples:
 
       ?- path_segments("/hello/there", Segments).
-         Segments = [[],"hello","there"]
-      ;  false.
+         Segments = [[],"hello","there"].
 
       ?- path_segments(Path, ["hello","there"]).
-         Path = "hello/there"
-      ;  false.
+         Path = "hello/there".
 
 
    To obtain the platform-specific directory separator, you can use:
 
       ?- path_segments(Separator, ["",""]).
-         Separator = "/"
-      ;  false.
+         Separator = "/".
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
 path_segments(Path, Segments) :-
index f576a0dc414acc8f07440b4148ad70cfb40c0af0..540bdb9fd700d7f981c081695cae9fcbf4cafc65 100644 (file)
@@ -64,8 +64,7 @@
    Example:
 
    ?- phrase(format_("~s~n~`.t~w!~12|", ["hello",there]), Cs).
-   %@    Cs = "hello\n......there!"
-   %@ ;  false.
+   %@    Cs = "hello\n......there!".
 
    I place this code in the public domain. Use it in any way you want.
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
index 35bfc7895ae859eddbb78a6e246489f57da0dec6..b5d9608aec9d7751579903e5afa6afe7a618db5f 100644 (file)
@@ -7,8 +7,7 @@
    Example:
 
        ?- getenv("LANG", Ls).
-          Ls = "en_US.UTF-8"
-       ;  false.
+          Ls = "en_US.UTF-8".
 
    Public domain code.
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
index d6b0ebae7944bd87b0de7eb01cb5e12646f13e56..30ec0f457c583daa497b5e7a92126caa64936565 100644 (file)
@@ -34,8 +34,7 @@
    Example:
 
      ?- current_time(T), phrase(format_time("%d.%m.%Y (%H:%M:%S)", T), Cs).
-        T = [...], Cs = "11.06.2020 (00:24:32)"
-     ;  false.
+        T = [...], Cs = "11.06.2020 (00:24:32)".
 
    sleep(S) sleeps for S seconds (a floating point number).
 
@@ -107,15 +106,14 @@ report_time(T0) :-
    false.
 
 :- time(use_module(library(clpz))).
-   % CPU time: 2.762 seconds
-   true
-;  false.
+   % CPU time: 0.000 seconds
+   % CPU time: 0.001 seconds
+   true.
 
 :- time(use_module(library(lists))).
    % CPU time: 0.000 seconds
-   true
-;  % CPU time: 0.001 seconds
-   false.
+   % CPU time: 0.001 seconds
+   true.
 
 ?- time(member(X, [a,b,c])).
    % CPU time: 0.000 seconds