/* Formatted numeric output (Rosetta code) in Picat. http://rosettacode.org/wiki/Formatted_numeric_output """ Express a number in decimal as a fixed-length string with leading zeros. For example, the number 7.125 could be expressed as 00007.125. """ Nope, I don't know how to get the leading 0s! This program was created by Hakan Kjellerstrand, hakank@gmail.com See also my Picat page: http://www.hakank.org/picat/ */ % import v3_utils. % import util. % import cp. main => go. go ?=> printf("<%5.3f>%n", 7.125), nl. go => true.