World: r3wp
[I'm new] Ask any question, and a helpful person will try to answer.
older newer | first last |
alemar 18-Jan-2011 [4115x2] | ok please don`t hate me i got this: |
>> do %/C/users/alemar/download/test.r ** Access error: cannot open: %/C/users/alemar/download/test.r reason: -3 ** Where: read either read-decode case load -apply- do ** Near: read source if find system/options/file-types type [data: de... | |
Henrik 18-Jan-2011 [4117] | alemar, is your console a black DOS like console? |
alemar 18-Jan-2011 [4118] | yes |
Henrik 18-Jan-2011 [4119] | ok, you are using REBOL 3. I suggest using REBOL 2 for now, as REBOL 3's console is currently rather hard to use. |
alemar 18-Jan-2011 [4120x2] | rebol3 alpha to be exact |
ok | |
Henrik 18-Jan-2011 [4122] | there won't be much difference at your learning level |
alemar 18-Jan-2011 [4123x3] | thanks |
at the downloads the only version 2 is REBOL/View 2.7 for Graphical Applications | |
will that do? | |
Maxim 18-Jan-2011 [4126] | yep. |
alemar 18-Jan-2011 [4127x4] | ? |
the site asks for user and pass for sdk | |
am in the right section at all | |
http://www.rebol.com/download-view.html | |
Maxim 18-Jan-2011 [4131] | darn, the site was broken sometime yesterday... forgot... only the guys at rebol.com can fix that. |
alemar 18-Jan-2011 [4132] | hmm np i will search GOOGLE for anothe mirror :D |
Maxim 18-Jan-2011 [4133x2] | they are also here... |
http://www.rebol.com/downloads/v277/ | |
alemar 18-Jan-2011 [4135] | you are a magician |
Maxim 18-Jan-2011 [4136] | actually... this is the one you want: http://www.rebol.com/downloads/v277/rebol-view-277-3-1.exe |
Henrik 18-Jan-2011 [4137] | Carl is notified. |
alemar 18-Jan-2011 [4138] | well guys i have to say the community works and i am pleasntly impressed.I am checking the libraries now and trying to get the script to work since i am getting ** Access Error: Cannot open /C/users/alemar/download/test.r ** Where: halt-view ** Near: do %/C/users/alemar/download/test.r i will figure it out eventually and i can get to real programing in this langueage** Access Error: Cannot open /C/users/alemar/download/test.r |
Maxim 18-Jan-2011 [4139] | type: exists? % /C/users/alemar/download/ |
alemar 18-Jan-2011 [4140] | hmm ok |
Henrik 18-Jan-2011 [4141] | you are doing the right thing. the question is if the script is really put there and if Windows allows reading there. I suppose you are using Win7? |
alemar 18-Jan-2011 [4142] | yes i am |
Maxim 18-Jan-2011 [4143] | ooops... exists? %/C/users/alemar/download/ |
alemar 18-Jan-2011 [4144] | as a vmachine at the moment |
Henrik 18-Jan-2011 [4145] | Carl has fixed the site problem. |
alemar 18-Jan-2011 [4146x2] | ahaaa i get --false |
so i just gotta change the file location | |
Maxim 18-Jan-2011 [4148] | the R2 console can actually act like a shell. in the latest release (2.7.8) they added posix style shortcuts to the various file operations directly... so you can do: >> cd %/C/users/alemar/download/ >> ls |
alemar 18-Jan-2011 [4149] | yeah i got it now it is verry simple i just assosciated the.r extension with rebol :D |
Maxim 18-Jan-2011 [4150] | the advantage of opening the console first and executing do is that any console i/o will remain in the current console... if you just double click on a simple script, REBOL will open execute and close so fast, you might not even see it flash on screen! |
alemar 18-Jan-2011 [4151] | aha |
Maxim 18-Jan-2011 [4152] | one of the advantages of being only 700kb ;-) |
alemar 18-Jan-2011 [4153x2] | ok but now when i start the file directly i get ** Syntax Error: Script is missing a REBOL header ** Near: do/args script system/script/args |
my-func: func [] [ n: to-integer ask "enter a number" if n < 0 [quit/return 1] sum: 0 i: 0 while [ i <= n ] [ sum: sum + probe (i * i) i: i + 1] print sum ] | |
Maxim 18-Jan-2011 [4155] | ah yes. scripts *must* start with rebol's header. rebol [ ] |
alemar 18-Jan-2011 [4156] | this is the body of the file |
Henrik 18-Jan-2011 [4157] | did you add the first line: REBOL [] ? |
alemar 18-Jan-2011 [4158x2] | REBOL[] my-func: func [] [ n: to-integer ask "enter a number" if n < 0 [quit/return 1] sum: 0 i: 0 while [ i <= n ] [ sum: sum + probe (i * i) i: i + 1] print sum ] |
like so? | |
Maxim 18-Jan-2011 [4160] | you can see that Rebol is case insensitive ;-) |
Henrik 18-Jan-2011 [4161] | yep |
Maxim 18-Jan-2011 [4162] | yep. and don't forget to run the function at the end... I'd also put a trailing ask "" REBOL[] my-func: func [] [ n: to-integer ask "enter a number: " if n < 0 [quit/return 1] sum: 0 i: 0 while [ i <= n ] [ sum: sum + probe (i * i) i: i + 1] print sum ] my-func ask "press enter to quit" |
alemar 18-Jan-2011 [4163x2] | ok trying that as well,on a side note now the file does not start :D |
sry my mistake | |
older newer | first last |