Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.maple > #1328
| Newsgroups | comp.soft-sys.math.maple |
|---|---|
| Date | 2018-10-30 14:50 -0700 |
| Message-ID | <ae1df418-26fa-49df-8051-cbec90705b02@googlegroups.com> (permalink) |
| Subject | printf fussy about format string |
| From | jfh <john.harper@vuw.ac.nz> |
Why is Maple happy with cat but not || in a format string?
|\^/| Maple 2017 (X86 64 LINUX)
._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2017
\ MAPLE / All rights reserved. Maple is a trademark of
<____ ____> Waterloo Maple Inc.
| Type ? for help.
> with(StringTools):
> z1:=1+I;
z1 := 1 + I
> z2:=1-I;
z2 := 1 - I
> printf(cat(Repeat("%+12.5e*e^(I*%+12.5e) ",2),"\n"),
> abs(z1),argument(z1),abs(z2),argument(z2));
+1.41421e+00*e^(I*+7.85398e-01) +1.41421e+00*e^(I*-7.85398e-01)
> printf(Repeat("%+12.5e*e^(I*%+12.5e) ",2)||"\n",
> abs(z1),argument(z1),abs(z2),argument(z2));
Error, (in fprintf) format string expected
> z2:=1-I;
Back to comp.soft-sys.math.maple | Previous | Next — Next in thread | Find similar
printf fussy about format string jfh <john.harper@vuw.ac.nz> - 2018-10-30 14:50 -0700 Re: printf fussy about format string acer <maple@rogers.com> - 2018-10-31 06:08 -0700
csiph-web