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

[newbie] Spaces within words?

 [1/5] from: apwing:zonnet:nl at: 6-Aug-2003 18:15


Hello again, I'm studying in the book "REBOL The Official Guide". On p.170 (and others) I find an examples like: current index: find video-db video-title if found? current index [ do something ] It seems that "current index" (with embedded blank), is regarded as one word. AFAIK from other REBOL documentation, blanks are used as word delimiters and may not appear within words. Is that true? Arie van Wingerden

 [2/5] from: maximo:meteorstudios at: 6-Aug-2003 12:48


exact, probably a typo it was probably meant as: current-index: find video-db video-title if found? current-index [ do something ] but you could also write the code as: if found? find video-db video-title [ do something ] or even: if find video-db video-title [ do something ] or if you need the index: if found? current-index: find video-db video-title [ do something print index? current-index ] -max ----------- meteor Studios, T.D. ----------- Never Argue with an idiot. They will bring you down to their level and beat you with experience

 [3/5] from: g:santilli:tiscalinet:it at: 6-Aug-2003 23:15


Hi Arie, On Wednesday, August 6, 2003, 6:15:08 PM, you wrote: AvW> It seems that "current index" (with embedded blank), is regarded as one word. IIRC when the book went to print all underscore characters were converted for some reason to spaces. So that was current_index actually. I think Elan has a web site with all the corrections. Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amiga Group Italia sez. L'Aquila --- SOON: http://www.rebol.it/

 [4/5] from: rebol:techscribe at: 6-Aug-2003 16:03


Hi Arie,. The spaces within the words was a formatting error that resulted from a last-minute effort to conform with the publishers requests. You can, however, emulate spaces in words along these lines:
>> spaces-in-words: make word! "spaces in words"
== spaces in words
>> set spaces-in-words 300
== 300
>> spaces-in-words
== spaces in words
>> type? spaces-in-words
== word!
>> mold spaces-in-words
== "spaces in words"
>> get spaces-in-words
== 300
>> mold get spaces-in-words
== "300"
>> type? get spaces-in-words
== integer! Arie van Wingerden wrote:

 [5/5] from: apwing:zonnet:nl at: 7-Aug-2003 21:36


Aha, that possibility crossed my mind, since the same thing did occur on other pages as well! Thanx Arie van Wingerden