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

[REBOL] [trim][string] Something strange in the Rebol string ?

From: didec::tiscali::fr at: 4-May-2004 14:11

[trim][string] Something strange in the Rebol string ? I should say that there is Gurus needs here ! The following code (under Windows) should work in the same manner (displaying a card game symbol you know), but not ! REBOL [ ] ; it works tx: "" view layout [text tx font-size 40 font-name "symbol"] ; it does not works tx2: to-string to-char 167 view layout [text tx2 font-size 40 font-name "symbol"] The first works, the second displays an unwanted character following the wanted one. I know that it's 'trim/lines that modified the string and add this char (not the same each time, and either the View version you use). But I'm completely lost to found the behaviour and the "why ?" Here is a console session : REBOL/View 1.2.1.3.1 21-Jun-2001
>> trim/lines to string! to char! 167
== ""
>> trim/lines to string! to char! 167
== ""
>> trim/lines to string! to char! 167
== ""
>> trim/lines to string! to char! 167
== ""
>> trim/lines to string! to char! 167
== ""
>> trim/lines to string! to char! 167
== ""
>> trim/lines to string! to char! 167
== "["
>> trim/lines to string! to char! 167
== ""
>> trim/lines to string! to char! 167
== ""
>> trim/lines to string! to char! 167
== ""
>> trim/lines to string! to char! 167
== ""
>> trim/lines to string! to char! 167
== ""
>> >> trim/lines ""
== ""
>> trim/lines ""
== ""
>> trim/lines ""
== ""
>> trim/lines ""
== ""
>> trim/lines ""
== ""
>> trim/lines ""
== "" As you see the trim/lines adds another character in the string obtained by "to string!", randomly. No problem it seems with other versions. But the script at top, while saved in a file, show the problem with all versions (but not all the time) ! My first though is that 'trim is bugged, but can it be the behaviour of Rebol with constant string and generated one ? How can I say... Help !!! DideC PS: I hope the foreign chars will displayed well on your computer (french codepage here).