Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

rejoin with tag

 [1/2] from: Patrick:Philipot:laposte at: 24-Oct-2004 21:42

Hi List Is this a bug?
>> print rejoin [<html> "text" </html>]
<htmltext</html>> and it's not the / (slash) that cause the problem.
>> print rejoin [<tag> "text" <tag>]
<tagtext<tag>> I'am using REBOL/View 29-Jul-2004 Core 2.6.0 Ciao Patrick

 [2/2] from: carl::cybercraft::co::nz at: 24-Oct-2004 21:47

On Sunday, 24-October-2004 at 21:42:52 you wrote,
>Hi List >Is this a bug?
<<quoted lines omitted: 3>>
>>> print rejoin [<tag> "text" <tag>] ><tagtext<tag>>
No - not a bug. The type of value REJOIN returns will be the same as the first value in the block, so with your example, you're getting a tag back. You can see what's happening here...
>> probe rejoin [<html> "text"]
<htmltext> == <htmltext>
>> probe rejoin [<html> "text" "more text"]
<htmltextmore text> == <htmltextmore text>
>> probe rejoin [<html> "text" "more text" <and a tag>]
<htmltextmore text<and a tag>> == <htmltextmore text<and a tag>> To get what I assume you want, ensure the first value's a string in one way or another...
>> probe rejoin ["" <html> "text" </html>]
<html>text</html> == "<html>text</html>"
>> probe rejoin [mold <html> "text" </html>]
<html>text</html> == "<html>text</html>" Hope that helps. -- Carl Read

  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted