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"),+1.41421e+00*e^(I*+7.85398e-01) +1.41421e+00*e^(I*-7.85398e-01)
abs(z1),argument(z1),abs(z2),argument(z2));
printf(Repeat("%+12.5e*e^(I*%+12.5e) ",2)||"\n",Error, (in fprintf) format string expected
abs(z1),argument(z1),abs(z2),argument(z2));
z2:=1-I;
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"),+1.41421e+00*e^(I*+7.85398e-01) +1.41421e+00*e^(I*-7.85398e-01)
abs(z1),argument(z1),abs(z2),argument(z2));
printf(Repeat("%+12.5e*e^(I*%+12.5e) ",2)||"\n",Error, (in fprintf) format string expected
abs(z1),argument(z1),abs(z2),argument(z2));
z2:=1-I;
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 296 |
Nodes: | 16 (2 / 14) |
Uptime: | 45:30:47 |
Calls: | 6,648 |
Files: | 12,197 |
Messages: | 5,329,774 |