If I understand what you're asking for, I think you want something like
string.format()
<http://chapel.cray.com/docs/latest/modules/standard/IO.html#IO.string.format>
.
For example, in Chapel on can do:
> var x = 42;
> var y = 3.1415926;
> var m = "(%i, %r)".format(x,y);
> writeln(m);
> // Output: (42, 3.14159)
which compares closely with the equivalent Python:
> x = 42
> y = 3.1415926
> m = '({}, {})'.format(x,y)
> print m
> # Output: (42, 3.1415926)
On Sat, Sep 3, 2016 at 11:21 AM, Russel Winder <[email protected]> wrote:
> Chapel has a variation on the classic C formatted input/output. Is the
> formatting capability exposed so as to allow for string formatting
> within programs. Java and Python both provide an API for creating
> strings from templates without the I/O bit.
> --
> Russel.
> ============================================================
> =================
> Dr Russel Winder t: +44 20 7585 2200 voip:
> sip:[email protected]
> 41 Buckmaster Road m: +44 7770 465 077 xmpp: [email protected]
> London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
> ------------------------------------------------------------
> ------------------
>
> _______________________________________________
> Chapel-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/chapel-users
>
>
------------------------------------------------------------------------------
_______________________________________________
Chapel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-users