VW compatible expandMacros
authorClaus Gittinger <cg@exept.de>
Thu, 24 May 2018 14:33:19 +0200
changeset 22999 c3bafb980bf4
parent 22998 597975de8f85
child 23000 5760bcf5994e
VW compatible expandMacros
CharacterArray.st
--- a/CharacterArray.st	Thu May 24 14:32:36 2018 +0200
+++ b/CharacterArray.st	Thu May 24 14:33:19 2018 +0200
@@ -1965,7 +1965,7 @@
                         ^ self
                     ].
                     fmt := in next.
-                    (fmt ~~ $? and:[in peek ~~ $>]) ifTrue:[
+                    (fmt ~~ $? and:[fmt ~~ $# and:[in peek ~~ $>]]) ifTrue:[
                         out nextPut:$<.
                         nr printOn:out.
                         out nextPut:fmt.
@@ -1989,10 +1989,11 @@
                             ] ifFalse:[
                                 out nextPutAll:arg asString string.  "see method comment: arg must know #asString"
                             ]
-                        ] ifFalse:[fmt == $? ifTrue:[
+                        ] ifFalse:[(fmt == $? or:[fmt == $#]) ifTrue:[
                             s1 := in upTo:$:.
                             s2 := in nextUpTo:$>.
-                            arg == true ifTrue:[
+                            ((fmt == $? and:[arg == true])
+			    or:[(fmt == $# and:[arg == 1])]) ifTrue:[
                                 out nextPutAll:s1
                             ] ifFalse:[
                                 out nextPutAll:s2