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

Quick javascript->rebol question

 [1/3] from: chalz::earthlink::net at: 9-Oct-2005 3:46


Howdy. I have a quick question here which isn't purely REBOL. I'm trying to convert some javascript into REBOL, though, and came across something I'm uncertain of: int dn=dr;{while (dr==dn || dr==dj || dr==du){dr=(int)random(8)+1;}} Why is the while wrapped in brackets? What does this do? It's been about 6 or so years since I worked in Java or C/++ - never really did javascript at all, but the majority of it is easily deciphered. This however has me temporarily confused. Appreciate any info. Thanks. --Charles

 [2/3] from: Izkata:Comcast at: 9-Oct-2005 10:24


> Howdy. I have a quick question here which isn't purely REBOL. I'm trying > to convert some javascript into REBOL, though, and came across something
<<quoted lines omitted: 4>>
> really did javascript at all, but the majority of it is easily deciphered. > This however has me temporarily confused. Appreciate any info. Thanks.
It means pretty much nothing in Java (maybe an 'if' was removed, and they were being lazy?), but that's all I know - it seemed to run the same. Try removing them in the Javascript, see if there's a difference.. -Izzy

 [3/3] from: shiningray::nirvana::gmail::com at: 12-Oct-2005 17:08


Of course, you can remove them. 2005/10/9, Charles <[chalz--earthlink--net]>:
> Howdy. I have a quick question here which isn't purely REBOL. I'm trying to convert some javascript into REBOL, though, and came across something I'm uncertain of: > int dn=dr;{while (dr==dn || dr==dj || dr==du){dr=(int)random(8)+1;}}
<<quoted lines omitted: 4>>
> To unsubscribe from the list, just send an email to > lists at rebol.com with unsubscribe as the subject.
-- From <a href="http://www.cnblogs.com/shiningray">ShiningRay</a> @ <a href="http://www.nirvanastudio.org">NirvanaStudio</a>

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