rebol3

C-style for loops in REBOL

浪尽此生 提交于 2019-12-12 14:20:02
问题 I attempted to write a C-style for-loop in REBOL: for [i: 0] [i < 10] [i: i + 1] [ print i ] This syntax doesn't appear to be correct, though: *** ERROR ** Script error: for does not allow block! for its 'word argument ** Where: try do either either either -apply- ** Near: try load/all join %/users/try-REBOL/data/ system/script/args... Does REBOL have any built-in function that is similar to a C-style for loop, or will I need to implement this function myself? The equivalent construct in a C

How to create Windows executable (.exe) from red lang?

≡放荡痞女 提交于 2019-12-11 04:04:46
问题 I'm building a red lang application. How to create Windows executable (.exe) from red lang??? 回答1: If you have already the red executable, you call from the command line red -c -t Windows yourprogram.red and you will get yourprogram.exe as a Windows program README.md Of course I assume, you have also downloaded all the possibly additionally needed source files from either red-lang/download or github/red/red If you have a recent rebol interpreter, you can compile with do/args %red.r "-t

Trouble with 'export word in module

主宰稳场 提交于 2019-12-11 02:44:49
问题 Let's mod.reb: REBOL[Type: module Name: mod] export: add 1 2 Let's test.reb: import 'mod Running r3 test.reb , got: ** Script error: add has no value ** Where: do module catch case load-module apply for-each case import do either either either --anonymous-- ** Near: ... add 3 2 Same trouble with other funcs instead of 'add. No trouble with other names instead of 'export No trouble inserting a dummy 'export before export: ... (!?) Why this? 来源: https://stackoverflow.com/questions/40284088

Rebol GUI on Android Displays Too Small

时光怂恿深爱的人放手 提交于 2019-12-10 10:46:13
问题 So I've discovered Rebol, and am thrilled that it runs on Android. When I create a GUI, though, the GUI first pops up with the top left corner in the center of the screen, and I cannot move or resize the window. If I rotate my phone to a horizontal display, the window resizes itself to the screen properly. Then I rotate my phone to a vertical display, and the window fills the screen properly. But everything on the window is minuscule--almost too small to interact with via finger taps. I haven

If…else if…else in REBOL

我的未来我决定 提交于 2019-12-08 17:43:29
问题 I've noticed that REBOL doesn't have a built in if...elsif...else syntax, like this one: theVar: 60 {This won't work} if theVar > 60 [ print "Greater than 60!" ] elsif theVar == 3 [ print "It's 3!" ] elsif theVar < 3 [ print "It's less than 3!" ] else [ print "It's something else!" ] I have found a workaround, but it's extremely verbose: theVar: 60 either theVar > 60 [ print "Greater than 60!" ][ either theVar == 3 [ print "It's 3!" ][ either theVar < 3 [ print "It's less than 3!" ][ print

Rebol Quickstart [closed]

我怕爱的太早我们不能终老 提交于 2019-12-07 15:28:43
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 3 years ago . I've been meaning to try out rebol (or red). I think it might be the perfect fit for my next project. I've downloaded and tested out red 0.5.4, and REBOL/View 2.7(http://www.rebol.com/download-view.html) However, there are a couple of roadblocks for a complete beginner to rebol:

What's known about UTYPE! in REBOL 3?

梦想的初衷 提交于 2019-12-07 08:20:35
问题 The only information I can find on the datatype UTYPE! is "not yet been documented for R3" and "user defined datatype", still giving a shred of hope that I can break out of Rebol's canon of predefined datatypes and formulate the polymorphism of my functions in a more straightforward manner. Just... I've no idea how to deal with UTYPE!. Trying: make utype! <2nd-arg> with several kinds of arguments (including an object) was invariably leading to "Script error: invalid argument: <2nd-arg>". So,

Rebol GUI on Android Displays Too Small

半城伤御伤魂 提交于 2019-12-06 14:43:01
So I've discovered Rebol , and am thrilled that it runs on Android. When I create a GUI, though, the GUI first pops up with the top left corner in the center of the screen, and I cannot move or resize the window. If I rotate my phone to a horizontal display, the window resizes itself to the screen properly. Then I rotate my phone to a vertical display, and the window fills the screen properly. But everything on the window is minuscule--almost too small to interact with via finger taps. I haven't seen anyone else complaining about this issue. How can I fix it? I want the widgets to display the

Rebol Quickstart [closed]

怎甘沉沦 提交于 2019-12-05 20:35:18
Closed . This question needs to be more focused . It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post . Closed 3 years ago . I've been meaning to try out rebol (or red). I think it might be the perfect fit for my next project. I've downloaded and tested out red 0.5.4, and REBOL/View 2.7( http://www.rebol.com/download-view.html ) However, there are a couple of roadblocks for a complete beginner to rebol: Red seems to be still in alpha so it is out of the question There seems to be 3+(?) branches: REBOL3

Why are the 'context' and 'object' functions in Rebol different, but essentially the same?

限于喜欢 提交于 2019-12-05 17:05:14
On the one hand we have: >> source object object: make function! [[ "Defines a unique object." blk [block!] "Object words and values." ][ make object! append blk none ]] For context we see: >> source context context: make function! [[ "Defines a unique object." blk [block!] "Object words and values." ][ make object! blk ]] So, for object the object is constructed from a block to which none has been appended. This doesn't change the length, or, to my knowledge, add anything. With context , on the other hand, the object is constructed with the passed-in block, as is. Why the difference and why,