On Thu, 13 Apr 2023 at 15:40, <avi.e.gr...@gmail.com> wrote: > And, no, I do not suggest 2.5 be interpreted as putting in an > approximate percentage so that .8 * "Hello" should result in "Hell" ...
$ pike Pike v8.1 release 15 running Hilfe v3.5 (Incremental Pike Frontend) Ok. > "Hello, world! " * 2.5; (1) Result: "Hello, world! Hello, world! Hello, " > "Hello, world! Hello, world! Hello, " / 10; (2) Result: ({ /* 3 elements */ "Hello, wor", "ld! Hello,", " world! He" }) > "Hello, world! Hello, world! Hello, " % 10; (3) Result: "llo, " > "Hello, world! Hello, world! Hello, " / 10.0; (4) Result: ({ /* 4 elements */ "Hello, wor", "ld! Hello,", " world! He", "llo, " }) > Multiplying and dividing strings by floats makes perfect sense. (The ({ }) notation is Pike's array literal syntax; consider it equivalent to Python's square brackets for a list.) ChrisA -- https://mail.python.org/mailman/listinfo/python-list