println!
Print values while a program is compiled or evaluated. Debugging
println! value, [value, ...]
Prints its arguments separated by spaces, prefixed with the name of the function it runs in, e.g. entrypoint.nbv: 3 4. Static values are printed directly. Witness values are printed as their computed values when the witness is being computed; when only the R1CS is compiled there are no values and the variable itself is printed. The output goes to the info log when logging is enabled and to standard output otherwise.
Arguments
value- One or more expressions, static or witness. Named variables are moved, so print
(clone! v)to keep using a vector.
Returns
Nothing, it is used as a statement.
Constraints
None.
Example
(let x) static n = len! x # prints: entrypoint.nbv: length 2 values 3 4 println! "length", n, "values", (clone! x) x * x
Notes
String literals are static vectors of field elements (see values). A static vector of fewer than 10 elements that decodes as such a string is printed as text, so labels like "length" read naturally; other statics print as numbers.
Used in the standard library
bdlop/bdlop_lattice, bdlop/bdlop_linear_nizk_verify, bdlop/bdlop_milli_config, bdlop/bdlop_r1cs_verify, mersenne61/poseidon/poseidon_mersenne61, milli/poseidon/poseidon_milli, oraccle/oraccle_commit, oraccle/oraccle_squeeze