Echo collapses multiple spaces to one.
Is there a workaround?
echo("e e e");
ECHO: "e e e"
--
Sent from: http://forum.openscad.org/
Using for a space seems to work. Perhaps that should be an automatic
substitution.
On Sat, 16 Feb 2019 at 11:13, TLC123 torleif.ceder@gmail.com wrote:
Echo collapses multiple spaces to one.
Is there a workaround?
echo("e e e");
ECHO: "e e e"
--
Sent from: http://forum.openscad.org/
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
TLC123 torleif.ceder@gmail.com writes:
Echo collapses multiple spaces to one.
Is there a workaround?
The output is formattet as HTML. So you can do something like:
echo("e e e");
echo("<pre>e e e</pre>");
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Other_Language_Features#Echo_Statements
Hope this helps,
Nice but how can i print n number of spaces
If i want to indent by say recursion level
--
Sent from: http://forum.openscad.org/
You would print n instead.
On Sat, 16 Feb 2019 at 11:32, TLC123 torleif.ceder@gmail.com wrote:
Nice but how can i print n number of spaces
If i want to indent by say recursion level
--
Sent from: http://forum.openscad.org/
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
I realized it was the HMTL parser does the collapsing so my workaround was
this
echo("<pre>w w w");
ECHO: "
"
Introduces a line break but i can live with that. Tanks.
--
Sent from: http://forum.openscad.org/
function spaces(n) = n <= 0 ? "" : str(" ", spaces(n -1));
echo(str(spaces(10), "hello"));
ECHO: " hello"
On Sat, 16 Feb 2019 at 11:41, nop head nop.head@gmail.com wrote:
You would print n instead.
On Sat, 16 Feb 2019 at 11:32, TLC123 torleif.ceder@gmail.com wrote:
Nice but how can i print n number of spaces
If i want to indent by say recursion level
--
Sent from: http://forum.openscad.org/
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org